Originally Posted by obd
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?
|
What are you trying to do? You can't easily tell when a spell is being cast, before it is.
Originally Posted by nightcracker
Try this:
Code:
hooksecurefunc("CastSpellByName", function(...)
-- bla bla bla
end)
And make sure to do the same for all other "CastByXXX" functions.
|
Pulling my notes from LHC4, this isn't true, because hooksecurefunc are called after the original function is, you end up with this (with auto self cast on): CastSpellByName -> UNIT_SPELLCAST_SENT -> secure hooks.