Method Global:RegisterAllCreatureEvent [-] [+]
Registers a Creature event handler. It used AllCreatureScript so this don't need creature entry as a key.
enum AllCreatureEvents
{
ALL_CREATURE_EVENT_ON_ADD = 1, // (event, creature)
ALL_CREATURE_EVENT_ON_REMOVE = 2, // (event, creature)
ALL_CREATURE_EVENT_ON_SELECT_LEVEL = 3, // (event, creature_template, creature)
ALL_CREATURE_EVENT_ON_BEFORE_SELECT_LEVEL = 4, // (event, creature_template, creature, level) - Can return the new level
ALL_CREATURE_EVENT_ON_AURA_APPLY = 5, // (event, creature, aura)
ALL_CREATURE_EVENT_ON_HEAL = 6, // (event, creature, target, gain) - Can return new heal amount
ALL_CREATURE_EVENT_ON_DAMAGE = 7, // (event, creature, target, damage) - Can return new damage amount
ALL_CREATURE_EVENT_ON_AURA_REMOVE = 8, // (event, creature, aura, remove_mode)
ALL_CREATURE_EVENT_ON_MODIFY_PERIODIC_DAMAGE_AURAS_TICK = 9, // (event, creature, target, damage, spellInfo) - Can return new damage amount
ALL_CREATURE_EVENT_ON_MODIFY_MELEE_DAMAGE = 10, // (event, creature, target, damage) - Can return new damage amount
ALL_CREATURE_EVENT_ON_MODIFY_SPELL_DAMAGE_TAKEN = 11, // (event, creature, target, damage, spellInfo) - Can return new damage amount
ALL_CREATURE_EVENT_ON_MODIFY_HEAL_RECEIVED = 12, // (event, creature, target, heal, spellInfo) - Can return new heal amount
ALL_CREATURE_EVENT_ON_DEAL_DAMAGE = 13, // (event, creature, target, damage, damagetype) - Can return new damage amount
ALL_CREATURE_EVENT_COUNT
};
Synopsis
RegisterAllCreatureEvent( event, function )
RegisterAllCreatureEvent( event, function, shots )
Arguments
number eventEvent ID, refer to AllCreatureEvents above.
Valid numbers: integers from 0 to 4,294,967,295.
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
Nothing.