| rdfs:comment
| - The core event here is UNIT_SPELLCAST_SUCCEEDED (hereafter _SUCCEEDED). This event fires whenever a spellcast is completed server end, regardless of whether it is instant or cast. Therefore whenever an instant cast has been used successfully, this event will fire. However, there are times when _SUCCEEDED will fire but the spell is not instant. The events UNIT_SPELLCAST_START, UNIT_SPELLCAST_FAILED, and UNIT_SPELLCAST_INTERRUPTED (hereafter _START, _FAILED, and _INTERRUPTED) allow us to track precisely which spellcasts are instant and which are not.
|
| abstract
| - The core event here is UNIT_SPELLCAST_SUCCEEDED (hereafter _SUCCEEDED). This event fires whenever a spellcast is completed server end, regardless of whether it is instant or cast. Therefore whenever an instant cast has been used successfully, this event will fire. However, there are times when _SUCCEEDED will fire but the spell is not instant. The events UNIT_SPELLCAST_START, UNIT_SPELLCAST_FAILED, and UNIT_SPELLCAST_INTERRUPTED (hereafter _START, _FAILED, and _INTERRUPTED) allow us to track precisely which spellcasts are instant and which are not. The key to this code is the relation between these events. Here are the relevant details:
* All spells eventually trigger _SUCCEEDED if the cast completes, or _FAILED if it doesn't.
* Only spells with cast times fire _START.
* Every spell that starts must finish before another can begin; in other words, for every _START, we must hear finishing event (_SUCCEEDED, _FAILED or _INTERRUPTED) before we can hear another _START. Thus, to detect instant spells, note when someone starts] casting a spell, then watch for a corresponding finishing event. Any finishing event that occurs without an unfinished start event preceding it describes an instant cast spell.
|