From 7a0c7241ba4ac36b16c64da774459cbc6aa71550 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 18 Mar 2026 01:35:39 -0700 Subject: [PATCH] fix: parse macro action bar slots from SMSG_ACTION_BUTTONS Macro slots (type 0x40 / 64) were silently dropped by the default branch of the SMSG_ACTION_BUTTONS type switch, leaving the bar empty for any slot a player had set to a macro. ActionBarSlot::MACRO already existed and the UI already rendered it; only the parser was missing the case. Add case 0x40 to map to ActionBarSlot::MACRO for Classic (type=64), TBC, and WotLK formats, which all share the same 0x40 encoding for macros. --- src/game/game_handler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 147a79fe..212fa601 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4426,9 +4426,10 @@ void GameHandler::handlePacket(network::Packet& packet) { ActionBarSlot slot; switch (type) { case 0x00: slot.type = ActionBarSlot::SPELL; slot.id = id; break; - case 0x01: slot.type = ActionBarSlot::ITEM; slot.id = id; break; - case 0x80: slot.type = ActionBarSlot::ITEM; slot.id = id; break; - default: continue; // macro or unknown — leave as-is + case 0x01: slot.type = ActionBarSlot::ITEM; slot.id = id; break; // Classic item + case 0x80: slot.type = ActionBarSlot::ITEM; slot.id = id; break; // TBC/WotLK item + case 0x40: slot.type = ActionBarSlot::MACRO; slot.id = id; break; // macro (all expansions) + default: continue; // unknown — leave as-is } actionBar[i] = slot; }