Originally Posted by semlar
I would be very surprised if UNIT_SPELLCAST_SUCCEEDED didn't fire for this spell.
Try using RegisterEvent instead of RegisterUnitEvent, and then filter by source after you determine if it fires.
RegisterUnitEvent sometimes doesn't behave the way you would expect it to.
Also don't assume you have the spell IDs correct, watch for the spell name if you need to filter it or just don't filter it at all if it isn't too spammy, then once you know you have the right spell ID you can watch for that.
Occasionally scripted spells aren't considered "cast" by the player and can't be tracked directly, but they're relatively uncommon.
|
Hi semlar,
Just had a shot with
RegisterEvent (instead of
RegisterUnitEvent) as you've advised, but yeah...... It's still not getting it...
Lua Code:
local f = CreateFrame("Frame")
f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
f:SetScript("OnEvent", function(self, event, ...)
local _, spellName, _, _, spellID = ...
print(spellName, spellID)
end)
In addition to this, I've tried to print all available results from
COMBAT_LOG_EVENT_UNFILTERED, but same for this one.
Lua Code:
local f = CreateFrame("Frame")
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(self, event, ...)
local _, subEvent, _, _, _, _, _, _, _, _, _, spellID = ...
local spellName = GetSpellInfo(spellID)
if spellName then
print(subEvent, spellID, spellName)
end
end)
The only sub event fired for a poison bomb related spell is
SPELL_DAMAGE.
Hm..................... This is so tricky