Document undocumented return values of bound event functions (#335)

This commit is contained in:
Rochet2
2020-10-02 23:16:08 +03:00
committed by GitHub
parent 5a29f0a9ea
commit 6f4438ea2c
2 changed files with 14 additions and 14 deletions

12
Hooks.h
View File

@@ -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
};