(API) Event that triggers BEFORE spell cast?
Hi.
The title kind of says it all. I need a way to run script before spellcast, before UNIT_SPELLCAST_SENT, but can't find an event to trigger it. Is there one, am I just blind (I did search wowwiki)? If not, is there a workaround besides changing all the spells to macros with /script at the start? |
I don't think there is. "UNIT_SPELLCAST_START" is the earliest you can check and that I believe doesn't always trigger and instead using "UNIT_SPELLCAST_SUCCEEDED" when it doesn't trigger. But in both cases the cast has started.
Unfortunately the computer cannot know when someone is about to cast until they have started to cast. What exactly do you want your script to do ? |
Nvm, it's just a litlle something for myself. I'll just take the macro-workaround then, since it's not gonna have to be polished for publishing. Thanks tho :)
|
Try this:
Code:
hooksecurefunc("CastSpellByName", function(...) |
Quote:
Quote:
|
I know secure hooks are after the function, so I was HOPING that this would be the case:
CastSpellByName -> secure hooks -> UNIT_SPELLCAST_SENT At least I gave it a shot :P |
All times are GMT -6. The time now is 07:54 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI