Method Global:RegisterSpellEvent [-] [+]
Registers a Spell event handler.
| Event | State | Parameters | Comment |
|---|---|---|---|
| events.spell.on_cast | MAP | event, spell, skipCheck | |
| events.spell.on_aura_application | MAP | event, aura, auraEff, target, mode, apply | Can return true to prevent application |
| events.spell.on_dispel | MAP | event, aura, dispeller, dispellerSpellId, removedCharges | |
| events.spell.on_periodic_tick | MAP | event, aura, auraEff, target | Can return true to prevent tick |
| events.spell.on_periodic_update | MAP | event, aura, auraEff | |
| events.spell.on_aura_calc_amount | MAP | event, aura, auraEff, amount, canBeRecalculated | Can return amount, canBeRecalculated to override |
| events.spell.on_calc_periodic | MAP | event, aura, auraEff, isPeriodic, amplitude | Can return isPeriodic, amplitude to override |
| events.spell.on_check_proc | MAP | event, aura, procInfo | Can return false to prevent proc |
| events.spell.on_proc | MAP | event, aura, procInfo | Can return true to prevent default proc handling |
| events.spell.on_check_cast | MAP | event, spell | Can return SpellCastResult to override cast result |
| events.spell.on_before_cast | MAP | event, spell | |
| events.spell.on_after_cast | MAP | event, spell | |
| events.spell.on_object_area_target | MAP | event, spell, effIndex, targets | Modify targets table in place to change targets |
| events.spell.on_object_target | MAP | event, spell, effIndex, target | |
| events.spell.on_dest_target | MAP | event, spell, effIndex, mapId, x, y, z, orientation | Can return mapId, x, y, z, orientation to override destination |
| events.spell.on_effect_launch | MAP | event, spell, effIndex, mode | Can return true to prevent default launch handling |
| events.spell.on_effect_launch_target | MAP | event, spell, effIndex, mode | Can return true to prevent default launch target handling |
| events.spell.on_effect_calc_absorb | MAP | event, spell, attacker, victim, damage, absorb, resist, block, schoolMask, damageType, attackType, hitMask, resistAmount, absorbAmount | Can return resistAmount, absorbAmount to override |
| events.spell.on_effect_hit | MAP | event, spell, effIndex, mode | Can return true to prevent default hit handling |
| events.spell.on_before_hit | MAP | event, spell, missInfo | |
| events.spell.on_effect_hit_target | MAP | event, spell, effIndex, mode | Can return true to prevent default hit target handling |
| events.spell.on_hit | MAP | event, spell | |
| events.spell.on_after_hit | MAP | event, spell |
Synopsis
cancel = RegisterSpellEvent( entry, event, function )
cancel = RegisterSpellEvent( entry, event, function, shots )
Arguments
function functionFunction to register.
number shots (0)The number of times the function will be called, 0 means "always call this function".
Valid numbers: integers from 0 to 4,294,967,295.
Returns
function cancelA function that cancels the binding when called.