Event question: SPELL_CAST_SUCCESS
Hi I'm a newbie addon developer and I'm running into some trouble understanding the SPELL_CAST_SUCCESS event. I wrote a short block of code that is supposed to detect when a specific spell is casted and then trigger a cooldown frame I set up. However, the event only triggers when the spell casted is an instant cast spell such as Corruption or Drain Soul. When I successfully cast a casted spell like Haunt or Shadow Bolt, the event doesn't trigger.
Can someone help me understand why SPELL_CAST_SUCCESS doesn't work for casted spells and what event I should be using instead? Here is my code for reference: Code:
function DispelBar_OnEvent(event,...) Code:
if(spellName == "Haunt") Code:
if(spellName == "Corruption") Thanks for all help in advance and let me know if I need to clarify anything. |
I ran into something like this before and I forgot how I handled it. I'll have to take a look at combat log events again and see what comes up. You should be able to run the /etrace command and it'll show you a log of every event firing when they happen.
|
Thanks a lot for the etrace command I didn't know it existed. Very useful! With it I found that UNIT_SPELLCAST_SUCCEEDED can be used instead.
Thanks again Followup question: Why wouldnt' SPELL_CAST_SUCCESS work? The descriptions of it in all the documentation I've read never seem to mention any exceptions. |
To avoid any client/locale issues, it's probably best to use spell ID instead of spell name in if statments
|
Quote:
Why does CLEU fire in strange order? There is no solid answer, but latency, user/client CPU/RAM, ISP quality, and many other factors have their impact. The SPELLCAST events fire only on the client, and have no client-Blizzard-client loop, which is why they always work. But that's my best guess. |
All times are GMT -6. The time now is 01:36 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI