mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Document undocumented return values of bound event functions (#335)
This commit is contained in:
@@ -1051,7 +1051,7 @@ namespace LuaGlobalFunctions
|
||||
* CREATURE_EVENT_ON_REACH_WP = 6, // (event, creature, type, id) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_AIUPDATE = 7, // (event, creature, diff) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_RECEIVE_EMOTE = 8, // (event, creature, player, emoteid) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return new damage
|
||||
* CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return true to stop normal action, can return new damage as second return value.
|
||||
* CREATURE_EVENT_ON_PRE_COMBAT = 10, // (event, creature, target) - Can return true to stop normal action
|
||||
* // UNUSED
|
||||
* CREATURE_EVENT_ON_OWNER_ATTACKED = 12, // (event, creature, target) - Can return true to stop normal action // Not on mangos
|
||||
@@ -1068,7 +1068,7 @@ namespace LuaGlobalFunctions
|
||||
* CREATURE_EVENT_ON_RESET = 23, // (event, creature)
|
||||
* CREATURE_EVENT_ON_REACH_HOME = 24, // (event, creature) - Can return true to stop normal action
|
||||
* // UNUSED = 25, // (event, creature)
|
||||
* CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true, newRespawnDelay
|
||||
* CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true to stop normal action, can return new respawndelay as second return value
|
||||
* CREATURE_EVENT_ON_MOVE_IN_LOS = 27, // (event, creature, unit) - Can return true to stop normal action. Does not actually check LOS, just uses the sight range
|
||||
* // UNUSED = 28, // (event, creature)
|
||||
* // UNUSED = 29, // (event, creature)
|
||||
@@ -1113,7 +1113,7 @@ namespace LuaGlobalFunctions
|
||||
* CREATURE_EVENT_ON_REACH_WP = 6, // (event, creature, type, id) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_AIUPDATE = 7, // (event, creature, diff) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_RECEIVE_EMOTE = 8, // (event, creature, player, emoteid) - Can return true to stop normal action
|
||||
* CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return new damage
|
||||
* CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return true to stop normal action, can return new damage as second return value.
|
||||
* CREATURE_EVENT_ON_PRE_COMBAT = 10, // (event, creature, target) - Can return true to stop normal action
|
||||
* // UNUSED
|
||||
* CREATURE_EVENT_ON_OWNER_ATTACKED = 12, // (event, creature, target) - Can return true to stop normal action // Not on mangos
|
||||
@@ -1130,7 +1130,7 @@ namespace LuaGlobalFunctions
|
||||
* CREATURE_EVENT_ON_RESET = 23, // (event, creature)
|
||||
* CREATURE_EVENT_ON_REACH_HOME = 24, // (event, creature) - Can return true to stop normal action
|
||||
* // UNUSED = 25, // (event, creature)
|
||||
* CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true, newRespawnDelay
|
||||
* CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true to stop normal action, can return new respawndelay as second return value
|
||||
* CREATURE_EVENT_ON_MOVE_IN_LOS = 27, // (event, creature, unit) - Can return true to stop normal action. Does not actually check LOS, just uses the sight range
|
||||
* // UNUSED = 28, // (event, creature)
|
||||
* // UNUSED = 29, // (event, creature)
|
||||
@@ -1170,9 +1170,9 @@ namespace LuaGlobalFunctions
|
||||
* {
|
||||
* GAMEOBJECT_EVENT_ON_AIUPDATE = 1, // (event, go, diff)
|
||||
* GAMEOBJECT_EVENT_ON_SPAWN = 2, // (event, go)
|
||||
* GAMEOBJECT_EVENT_ON_DUMMY_EFFECT = 3, // (event, caster, spellid, effindex, go)
|
||||
* GAMEOBJECT_EVENT_ON_QUEST_ACCEPT = 4, // (event, player, go, quest) - Can return true
|
||||
* GAMEOBJECT_EVENT_ON_QUEST_REWARD = 5, // (event, player, go, quest, opt) - Can return true
|
||||
* GAMEOBJECT_EVENT_ON_DUMMY_EFFECT = 3, // (event, caster, spellid, effindex, go) - Can return true to stop normal action
|
||||
* GAMEOBJECT_EVENT_ON_QUEST_ACCEPT = 4, // (event, player, go, quest) - Can return true to stop normal action
|
||||
* GAMEOBJECT_EVENT_ON_QUEST_REWARD = 5, // (event, player, go, quest, opt) - Can return true to stop normal action
|
||||
* GAMEOBJECT_EVENT_ON_DIALOG_STATUS = 6, // (event, player, go)
|
||||
* GAMEOBJECT_EVENT_ON_DESTROYED = 7, // (event, go, attacker)
|
||||
* GAMEOBJECT_EVENT_ON_DAMAGED = 8, // (event, go, attacker)
|
||||
@@ -1181,7 +1181,7 @@ namespace LuaGlobalFunctions
|
||||
* // UNUSED = 11, // (event, gameobject)
|
||||
* GAMEOBJECT_EVENT_ON_ADD = 12, // (event, gameobject)
|
||||
* GAMEOBJECT_EVENT_ON_REMOVE = 13, // (event, gameobject)
|
||||
* GAMEOBJECT_EVENT_ON_USE = 14, // (event, go, player)
|
||||
* GAMEOBJECT_EVENT_ON_USE = 14, // (event, go, player) - Can return true to stop normal action
|
||||
* GAMEOBJECT_EVENT_COUNT
|
||||
* };
|
||||
* </pre>
|
||||
|
||||
12
Hooks.h
12
Hooks.h
@@ -261,7 +261,7 @@ namespace Hooks
|
||||
CREATURE_EVENT_ON_REACH_WP = 6, // (event, creature, type, id) - Can return true to stop normal action
|
||||
CREATURE_EVENT_ON_AIUPDATE = 7, // (event, creature, diff) - Can return true to stop normal action
|
||||
CREATURE_EVENT_ON_RECEIVE_EMOTE = 8, // (event, creature, player, emoteid) - Can return true to stop normal action
|
||||
CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return new damage
|
||||
CREATURE_EVENT_ON_DAMAGE_TAKEN = 9, // (event, creature, attacker, damage) - Can return true to stop normal action, can return new damage as second return value.
|
||||
CREATURE_EVENT_ON_PRE_COMBAT = 10, // (event, creature, target) - Can return true to stop normal action
|
||||
// UNUSED
|
||||
CREATURE_EVENT_ON_OWNER_ATTACKED = 12, // (event, creature, target) - Can return true to stop normal action // Not on mangos
|
||||
@@ -278,7 +278,7 @@ namespace Hooks
|
||||
CREATURE_EVENT_ON_RESET = 23, // (event, creature)
|
||||
CREATURE_EVENT_ON_REACH_HOME = 24, // (event, creature) - Can return true to stop normal action
|
||||
// UNUSED = 25, // (event, creature)
|
||||
CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true, newRespawnDelay
|
||||
CREATURE_EVENT_ON_CORPSE_REMOVED = 26, // (event, creature, respawndelay) - Can return true to stop normal action, can return new respawndelay as second return value
|
||||
CREATURE_EVENT_ON_MOVE_IN_LOS = 27, // (event, creature, unit) - Can return true to stop normal action. Does not actually check LOS, just uses the sight range
|
||||
// UNUSED = 28, // (event, creature)
|
||||
// UNUSED = 29, // (event, creature)
|
||||
@@ -297,9 +297,9 @@ namespace Hooks
|
||||
{
|
||||
GAMEOBJECT_EVENT_ON_AIUPDATE = 1, // (event, go, diff)
|
||||
GAMEOBJECT_EVENT_ON_SPAWN = 2, // (event, go)
|
||||
GAMEOBJECT_EVENT_ON_DUMMY_EFFECT = 3, // (event, caster, spellid, effindex, go)
|
||||
GAMEOBJECT_EVENT_ON_QUEST_ACCEPT = 4, // (event, player, go, quest) - Can return true
|
||||
GAMEOBJECT_EVENT_ON_QUEST_REWARD = 5, // (event, player, go, quest, opt) - Can return true
|
||||
GAMEOBJECT_EVENT_ON_DUMMY_EFFECT = 3, // (event, caster, spellid, effindex, go) - Can return true to stop normal action
|
||||
GAMEOBJECT_EVENT_ON_QUEST_ACCEPT = 4, // (event, player, go, quest) - Can return true to stop normal action
|
||||
GAMEOBJECT_EVENT_ON_QUEST_REWARD = 5, // (event, player, go, quest, opt) - Can return true to stop normal action
|
||||
GAMEOBJECT_EVENT_ON_DIALOG_STATUS = 6, // (event, player, go)
|
||||
GAMEOBJECT_EVENT_ON_DESTROYED = 7, // (event, go, attacker)
|
||||
GAMEOBJECT_EVENT_ON_DAMAGED = 8, // (event, go, attacker)
|
||||
@@ -308,7 +308,7 @@ namespace Hooks
|
||||
// UNUSED = 11, // (event, gameobject)
|
||||
GAMEOBJECT_EVENT_ON_ADD = 12, // (event, gameobject)
|
||||
GAMEOBJECT_EVENT_ON_REMOVE = 13, // (event, gameobject)
|
||||
GAMEOBJECT_EVENT_ON_USE = 14, // (event, go, player)
|
||||
GAMEOBJECT_EVENT_ON_USE = 14, // (event, go, player) - Can return true to stop normal action
|
||||
GAMEOBJECT_EVENT_COUNT
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user