From 5ee2b55f4bc2c9ea92829aa1e531e7de97292b56 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 07:48:06 -0700 Subject: [PATCH] feat: fire MIRROR_TIMER_START and MIRROR_TIMER_STOP events Fire MIRROR_TIMER_START with type, value, maxValue, scale, and paused args when breath/fatigue/fire timers begin. Fire MIRROR_TIMER_STOP with type when they end. Timer types: 0=fatigue, 1=breath, 2=fire. Used by timer bar addons to display breath/fatigue countdown overlays. --- src/game/game_handler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index cfba79f2..164e9d52 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -2275,6 +2275,11 @@ void GameHandler::handlePacket(network::Packet& packet) { mirrorTimers_[type].scale = scale; mirrorTimers_[type].paused = (paused != 0); mirrorTimers_[type].active = true; + if (addonEventCallback_) + addonEventCallback_("MIRROR_TIMER_START", { + std::to_string(type), std::to_string(value), + std::to_string(maxV), std::to_string(scale), + paused ? "1" : "0"}); } break; } @@ -2285,6 +2290,8 @@ void GameHandler::handlePacket(network::Packet& packet) { if (type < 3) { mirrorTimers_[type].active = false; mirrorTimers_[type].value = 0; + if (addonEventCallback_) + addonEventCallback_("MIRROR_TIMER_STOP", {std::to_string(type)}); } break; }