mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: fire PLAYER_UPDATE_RESTING event on rest state changes
Fire PLAYER_UPDATE_RESTING when the player enters or leaves a resting area (inn/capital city). Fires from both the SET_REST_START packet and the QUEST_FORCE_REMOVE rest-state update path. Used by XP bar addons and rest state indicator addons.
This commit is contained in:
parent
e64f9f4585
commit
b2826ce589
1 changed files with 4 additions and 0 deletions
|
|
@ -5564,6 +5564,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
isResting_ = nowResting;
|
||||
addSystemChatMessage(isResting_ ? "You are now resting."
|
||||
: "You are no longer resting.");
|
||||
if (addonEventCallback_)
|
||||
addonEventCallback_("PLAYER_UPDATE_RESTING", {});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -6433,6 +6435,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
isResting_ = (restTrigger > 0);
|
||||
addSystemChatMessage(isResting_ ? "You are now resting."
|
||||
: "You are no longer resting.");
|
||||
if (addonEventCallback_)
|
||||
addonEventCallback_("PLAYER_UPDATE_RESTING", {});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue