Catching spellcasting reliably
Hello !
As we know, spells with casting time generate two event, SPELLCAST_START when begun and SPELLCAST_STOP when stopped. Instant-cast spells only generate SPELLCAST_STOP. Channeled spells generate SPELLCAST_CHANNEL_START, SPELLCAST_CHANNEL_UPDATE and SPELLCAST_STOP.
For interruptions, SPELLCAST_INTERRUPTED is posted when an external operator, such as a skill or spell interrupts casting (Rogue kicks or mage counterspells). SPELLCAST_FAILED is posted when a spell gets resisted, for all spells, including instant cast. This information is available from WoW Wiki.
Now, a common scenario to accomplish catching spellcasting is to use a SPELLCAST_STOP-event logger in conjuction with a function hook to CastSpell and UseAction. However, if the player interrupts a casting-time or channeled spell by moving, it seems that SPELLCAST_STOP is generated first, immediately followed by SPELLCAST_INTERRUPTED.
Now, does anyone know what really happens if spellcasting is interrupted by an external operator ? Do we still receive SPELLCAST_STOP and SPELLCAST_INTERRUPTED right after each other ? And what about spell getting resisted ? Do we receive SPELLCAST_STOP and SPELLCAST_FAILED in sequence ? What is the logic behind all these events ?
|