From 5ab6286f7e93c59a472e4dd5ca30fd81c565173a Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 21 Mar 2026 06:23:03 -0700 Subject: [PATCH] fix: include pet unit ID in UNIT_HEALTH/POWER events from dedicated packets SMSG_HEALTH_UPDATE and SMSG_POWER_UPDATE were not checking for the pet GUID when dispatching addon events. Pet health/power bar addons now properly receive UNIT_HEALTH and UNIT_POWER with unitId="pet". The UPDATE_OBJECT and UNIT_AURA paths already had the pet check. --- src/game/game_handler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 05a83269..0f4ebc18 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -2165,6 +2165,7 @@ void GameHandler::handlePacket(network::Packet& packet) { if (guid == playerGuid) unitId = "player"; else if (guid == targetGuid) unitId = "target"; else if (guid == focusGuid) unitId = "focus"; + else if (guid == petGuid_) unitId = "pet"; if (!unitId.empty()) addonEventCallback_("UNIT_HEALTH", {unitId}); } @@ -2190,6 +2191,7 @@ void GameHandler::handlePacket(network::Packet& packet) { if (guid == playerGuid) unitId = "player"; else if (guid == targetGuid) unitId = "target"; else if (guid == focusGuid) unitId = "focus"; + else if (guid == petGuid_) unitId = "pet"; if (!unitId.empty()) addonEventCallback_("UNIT_POWER", {unitId}); }