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.
This commit is contained in:
Kelsi 2026-03-18 01:35:39 -07:00
parent 5801af41bc
commit 7a0c7241ba

View file

@ -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;
}