feat(Core/PlayerScript): Add Unequip hook (#23248)
Co-authored-by: Munzeria <Munzeria@dontemailme.lol> Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
parent
d54253310a
commit
ae8dd49fd4
4 changed files with 16 additions and 0 deletions
|
|
@ -329,6 +329,11 @@ void ScriptMgr::OnPlayerEquip(Player* player, Item* it, uint8 bag, uint8 slot, b
|
|||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_EQUIP, script->OnPlayerEquip(player, it, bag, slot, update));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerUnequip(Player* player, Item* it)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_UNEQUIP_ITEM, script->OnPlayerUnequip(player, it));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerJoinBG(Player* player)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_JOIN_BG, script->OnPlayerJoinBG(player));
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ enum PlayerHook
|
|||
PLAYERHOOK_ON_AFTER_SET_VISIBLE_ITEM_SLOT,
|
||||
PLAYERHOOK_ON_AFTER_MOVE_ITEM_FROM_INVENTORY,
|
||||
PLAYERHOOK_ON_EQUIP,
|
||||
PLAYERHOOK_ON_UNEQUIP_ITEM,
|
||||
PLAYERHOOK_ON_PLAYER_JOIN_BG,
|
||||
PLAYERHOOK_ON_PLAYER_JOIN_ARENA,
|
||||
PLAYERHOOK_GET_CUSTOM_GET_ARENA_TEAM_ID,
|
||||
|
|
@ -395,6 +396,9 @@ public:
|
|||
// After an item has been equipped
|
||||
virtual void OnPlayerEquip(Player* /*player*/, Item* /*it*/, uint8 /*bag*/, uint8 /*slot*/, bool /*update*/) { }
|
||||
|
||||
// After an item has been unequipped
|
||||
virtual void OnPlayerUnequip(Player* /*player*/, Item* /*it*/) { }
|
||||
|
||||
// After player enters queue for BG
|
||||
virtual void OnPlayerJoinBG(Player* /*player*/) { }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue