SPELLCAST_STOP

From Warcraft Wiki
Jump to navigation Jump to search

Fired when a spell cast stops.

"SPELLCAST_STOP"
  • Called twice when the spell is channelled. Once at start, once at completion.
  • The only SURE way to determine if a non-instant, non-damaging spell is cast successfully (such as Warlock Banish) is to do the following:
  1. Observe the spell start with UseAction or by trapping CastSpellByName() or one of the other methods of trapping spellcasts.
  2. Wait for SPELLCAST_STOP to arrive.
  3. When it arrives, you know the spell has stopped, but you don't know the reason!! It could be that the spell was cast successfully, or it was resisted, or the target was immune, or you moved. Schedule a success check 1/10th of a second in the future by using GetTime() and the OnUpdate() event callback.
  4. If you get to a 1/10th of a second in the future without receiving SPELLCAST_INTERRUPTED or SPELLCAST_FAILURE, then the spell landed successfully. If one of those other events occurred, you can kill your scheduled success check because the spell failed.

You could also check for the Banish debuff on the target, but that's a can of worms because the player can switch targets mid cast (which does happen in nutty endgame instances).

Patch changes