Tracking my spell casts and fails
Hi all
I need to track the player, (and the player only), spell casts, so I am tracking the different Spell Cast events. The UNIT_SPELLCAST_SENT event is the only one that returns the unit casting the spell, however this returns regardless of whether the cast goes off or not, (eg; casting Health Funnel cannot be cast on a pet that is already full health). I thought I could track UNIT_SPELLCAST_FAILED, UNIT_SPELLCAST_STOP and UNIT_SPELLCAST_SUCCEEDED yet these fire on any spell cast by others in the same group/instance/raid so I cannot guarantee that it is my spell that fails, stops or succeeds. I have further problems that when I get multiple returns from the one spell cast, ( eg I cast agony and I get two returns). Corruption returns multiples for two different spell IDs, (146739, 172), even though the spell cast sent is only for the 172 spell ID. Here is my event tracking chunk; Lua Code:
Here is a gif of the returns for each event that I am tracking; Is there a way that I can reliably track only my spell casts and only my spell cast successes? |
The first parameter in the payload for UNIT_xxx events is the unit that is the target of the event
Code:
local unit , x, x = ... Code:
local function OnEvent(self, event, ...) |
Thx Fizzlemizz
I thought that the first return was the unit I was targeting, not the unit casting the spell; thanks for pointing this one out to me. The issue with the corruption spell still confuses me; When I cast Corruption the spellID is 172, yet the success event returns two events, spellID 172 as well as the extra spellID 146739. The annoying part is both of the spellIDs both comeback as player, so effectively I am getting two successes for the one cast. I guess that there are multiple Corruption spells that have different spellIDs yet the one I cast is 172 so why do I get the second success of the spell I did not cast? |
Isn't 146739 the aura that gets applied with corruption?
|
Hey Fizzlemizz
Yes, you are right it is the buff. To ensure I am only testing the spellID I cast I have now saved the spellID on cast and test that against the success spellID, to ensure I capture the right return. Once again you have saved me. :) |
All times are GMT -6. The time now is 09:27 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI