From b2826ce5898bfb039c09197ccc60bce7d6a58e7e Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 03:27:09 -0700 Subject: [PATCH] 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. --- src/game/game_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index d5c7d364..7971a6c2 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -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; }