ui,game: add second action bar (Shift+1-12 keybinds, slots 12-23)

Expand action bar from 12 to 24 slots (2 bars × 12). Bar 2 is rendered
above bar 1 and loaded from SMSG_ACTION_BUTTONS slots 12-23. Pressing
Shift+number activates the corresponding bar-2 slot. Drag-and-drop,
cooldown overlays, and tooltips work identically on both bars. Bar 2
fades slightly when all its slots are empty to minimize visual noise.
This commit is contained in:
Kelsi 2026-03-10 06:04:43 -07:00
parent 753790ae47
commit 90b8cccac5
3 changed files with 235 additions and 244 deletions

View file

@ -3333,12 +3333,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
/*uint8_t mode =*/ packet.readUInt8();
rem--;
constexpr int SERVER_BAR_SLOTS = 144;
constexpr int OUR_BAR_SLOTS = 12; // our actionBar array size
for (int i = 0; i < SERVER_BAR_SLOTS; ++i) {
if (rem < 4) break;
uint32_t packed = packet.readUInt32();
rem -= 4;
if (i >= OUR_BAR_SLOTS) continue; // only load first bar
if (i >= ACTION_BAR_SLOTS) continue; // only load bars 1 and 2
if (packed == 0) {
// Empty slot — only clear if not already set to Attack/Hearthstone defaults
// so we don't wipe hardcoded fallbacks when the server sends zeros.