# Method Global:RegisterAuraEffectEvent [-] [+]

Registers a AuraEffect event handler.

    enum AuraEffectEvents
    {
        AURA_EFFECT_EVENT_ON_APPLY              = 1,    // (event, aurEff, mode)
        AURA_EFFECT_EVENT_AFTER_APPLY           = 2,    // (event, aurEff, mode)
        AURA_EFFECT_EVENT_ON_REMOVE             = 3,    // (event, aurEff, mode)
        AURA_EFFECT_EVENT_AFTER_REMOVE          = 4,    // (event, aurEff, mode)
        AURA_EFFECT_EVENT_ON_PERIODIC           = 5,    // (event, aurEff)
        AURA_EFFECT_EVENT_ON_UPDATE_PERIODIC    = 6,    // (event, aurEff)
        AURA_EFFECT_EVENT_CALC_AMOUNT           = 7,    // (event, aurEff, amount, canBeRecalculated)
        AURA_EFFECT_EVENT_CALC_PERIODIC         = 8,    // (event, aurEff, isPeriodic, period)
        AURA_EFFECT_EVENT_CALC_SPELLMOD         = 9,    // (event, aurEff, spellMod)
        AURA_EFFECT_EVENT_ON_ABSORB             = 10,   // (event, aurEff, dmgInfo, absorbAmount)
        AURA_EFFECT_EVENT_AFTER_ABSORB          = 11,   // (event, aurEff, dmgInfo, absorbAmount)
        AURA_EFFECT_EVENT_ON_HEAL_ABSORB        = 12,   // (event, aurEff, healInfo, absorbAmount)
        AURA_EFFECT_EVENT_AFTER_HEAL_ABSORB     = 13,   // (event, aurEff, healInfo, absorbAmount)
        AURA_EFFECT_EVENT_ON_MANA_SHIELD        = 14,   // (event, aurEff, dmgInfo, absorbAmount)
        AURA_EFFECT_EVENT_AFTER_MANA_SHIELD     = 15,   // (event, aurEff, dmgInfo, absorbAmount)
        AURA_EFFECT_EVENT_ON_SPLIT              = 16,   // (event, aurEff, dmgInfo, splitAmount)
        AURA_EFFECT_EVENT_CHECK_PROC            = 17,   // (event, aurEff, eventInfo) - Can return false to stop proc
        AURA_EFFECT_EVENT_ON_PROC               = 18,   // (event, aurEff, eventInfo)
        AURA_EFFECT_EVENT_AFTER_PROC            = 19,   // (event, aurEff, eventInfo)
        AURA_EFFECT_EVENT_COUNT
    };

    enum SpellEffIndex : uint8
    {
        EFFECT_0 = 0,
        EFFECT_1 = 1,
        EFFECT_2 = 2
    };

## Synopsis

`cancel = RegisterAuraEffectEvent( entry, event, effindex, function )`

`cancel = RegisterAuraEffectEvent( entry, event, effindex, function, shots )`

## Arguments

`number entry`

  AuraEffect entry Id (Use negative entry Id for all aura ranks).

  Valid numbers: integers from -2,147,483,647 to 2,147,483,647.

`number effindex`

  AuraEffect effect Id, refer to SpellEffIndex.

  Valid numbers: integers from 0 to 4,294,967,295.

`number event`

  AuraEffect event Id, refer to AuraEffectEvents above.

  Valid numbers: integers from 0 to 4,294,967,295.

`function function`

  Function 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 cancel`

  A function that cancels the binding when called.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine