mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat: expose OnPlayerUpdateArea() (#65)
This commit is contained in:
@@ -722,6 +722,11 @@ public:
|
||||
sEluna->OnBindToInstance(player, difficulty, mapid, permanent);
|
||||
}
|
||||
|
||||
void OnUpdateArea(Player* player, uint32 oldArea, uint32 newArea) override
|
||||
{
|
||||
sEluna->OnUpdateArea(player, oldArea, newArea);
|
||||
}
|
||||
|
||||
void OnUpdateZone(Player* player, uint32 newZone, uint32 newArea) override
|
||||
{
|
||||
sEluna->OnUpdateZone(player, newZone, newArea);
|
||||
|
||||
@@ -208,6 +208,7 @@ namespace Hooks
|
||||
PLAYER_EVENT_ON_LEARN_SPELL = 44, // (event, player, spellId)
|
||||
PLAYER_EVENT_ON_ACHIEVEMENT_COMPLETE = 45, // (event, player, achievement)
|
||||
PLAYER_EVENT_ON_FFAPVP_CHANGE = 46, // (event, player, hasFfaPvp)
|
||||
PLAYER_EVENT_ON_UPDATE_AREA = 47, // (event, player, oldArea, newArea)
|
||||
|
||||
PLAYER_EVENT_COUNT
|
||||
};
|
||||
|
||||
@@ -469,6 +469,7 @@ public:
|
||||
void OnDelete(uint32 guid);
|
||||
void OnSave(Player* pPlayer);
|
||||
void OnBindToInstance(Player* pPlayer, Difficulty difficulty, uint32 mapid, bool permanent);
|
||||
void OnUpdateArea(Player* pPlayer, uint32 oldArea, uint32 newArea);
|
||||
void OnUpdateZone(Player* pPlayer, uint32 newZone, uint32 newArea);
|
||||
void OnMapChanged(Player* pPlayer);
|
||||
void HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code);
|
||||
|
||||
@@ -381,6 +381,15 @@ void Eluna::OnBindToInstance(Player* pPlayer, Difficulty difficulty, uint32 mapi
|
||||
CallAllFunctions(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
void Eluna::OnUpdateArea(Player* pPlayer, uint32 oldArea, uint32 newArea)
|
||||
{
|
||||
START_HOOK(PLAYER_EVENT_ON_UPDATE_AREA);
|
||||
Push(pPlayer);
|
||||
Push(oldArea);
|
||||
Push(newArea);
|
||||
CallAllFunctions(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
void Eluna::OnUpdateZone(Player* pPlayer, uint32 newZone, uint32 newArea)
|
||||
{
|
||||
START_HOOK(PLAYER_EVENT_ON_UPDATE_ZONE);
|
||||
|
||||
Reference in New Issue
Block a user