# Method Global:RegisterAuraEvent [-] [+]

Registers a Aura event handler.

    enum AuraEvents
    {
        AURA_EVENT_CHECK_AREA_TARGET    = 1,    // (event, aura, target) - Can return false to stop aura application, Target is the Player/Creature.
        AURA_EVENT_ON_DISPEL            = 2,    // (event, aura, dispelInfo)
        AURA_EVENT_AFTER_DISPEL         = 3,    // (event, aura, dispelInfo)
        AURA_EVENT_CHECK_PROC           = 4,    // (event, aura, eventInfo) - Can return false to stop proc
        AURA_EVENT_PREPARE_PROC         = 5,    // (event, aura, eventInfo)
        AURA_EVENT_ON_PROC              = 6,    // (event, aura, eventInfo)
        AURA_EVENT_AFTER_PROC           = 7,    // (event, aura, eventInfo)
        AURA_EVENT_ON_REFRESH           = 8,    // (event, aura)

    };

## Synopsis

`cancel = RegisterAuraEvent( entry, event, function )`

`cancel = RegisterAuraEvent( entry, event, function, shots )`

## Arguments

`number entry`

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

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

`number event`

  Aura event Id, refer to AuraEvents 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