WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Some abilities do not show in combat log (https://www.wowinterface.com/forums/showthread.php?t=49117)

Spawnova 03-18-14 01:30 PM

Some abilities do not show in combat log
 
I'm trying to get abilities like concussive shot and silencing shot to show in the combat log but with no success, I'm just curious if such spells are not displayed in the combat log or if I'm missing something.

Here's what I have so far.

Lua Code:
  1. elseif event == "COMBAT_LOG_EVENT" then
  2.     local eventType,_,_,sourceName,_,_,_,_,_,_ = ...
  3.     if sourceName then
  4.         if string.find(sourceName, UnitName("player")) then
  5.             local sID,sID2 = select(11,...)
  6.             print(sID .. sID2)
  7.         end
  8.     end
  9. end

I have tried searching before posting, couldn't find anything. =[

Clamsoda 03-18-14 01:44 PM

I can guarantee that Concussive Shot and Silencing Shot both have combat log entries; you should try registering COMBAT_LOG_EVENT_UNFILTERED, and listen for that.

Edit: I was just looking at your code...don't use sourceName as your unit check, cache your GUID on PLAYER_LOGIN, and check the unit GUID. Even if that was the approach you wanted to take, cache UnitName so it isn't firing on every CLEU.

Spawnova 03-18-14 01:47 PM

Ah okay, that works.

I read on the wiki/wowpedia page that the normal event was the same as unfiltered just only tracking what you did so I figured it would would be fine, but everything shows up with unfiltered.

Thanks a bunch, =)

Clamsoda 03-18-14 01:54 PM

I am not entirely clear on the conditions that must be met for COMBAT_LOG_EVENT to fire; perhaps it depends on what filters you have set on your combat log?

In my experience, COMBAT_LOG_EVENT_UNFILTERED is typically the way to go, you're guaranteed to catch anything that triggers CLEU.

Just want to stress how many times CLEU fires a second in some environments, and to take care of how many function calls you make when it fires. If you -MUST- make a function call, make sure to narrow down your CLEU function with if-then blocks. Caching data like UnitName(or UnitGUID) helps as well.

Note: UnitGUID isn't available until PLAYER_LOGIN.

Phanx 03-18-14 02:07 PM

Quote:

Originally Posted by Clamsoda (Post 291628)
I am not entirely clear on the conditions that must be met for COMBAT_LOG_EVENT to fire; perhaps it depends on what filters you have set on your combat log?

Yep, that's exactly it. Addons interested in combat event detection should always use CLEU, never CLE. The only reason to ever use CLE in an addon would be if you were providing an alternative combat log display, such as sending the messages to a custom frame instead of ChatFrame2.

@Spawnova: If you're trying to get those spells to show in your combat log, check your settings by right-clicking the chat tab, clicking "Settings", and clicking the "Combat" category. If you're trying to do detect your use of those spells in an addon, watching UNIT_SPELLCAST_SENT/SUCCEEDED will be way more efficient than watching CLEU.

Spawnova 03-18-14 02:42 PM

Thanks guys, that's a lot of information I did not know about. :)


All times are GMT -6. The time now is 03:56 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI