From 37a5b4c9d9d40b686815c82e2c487f5759afb4b5 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 22:13:57 -0700 Subject: [PATCH] feat: fire ACTIONBAR_SLOT_CHANGED event on action bar updates Fire when SMSG_ACTION_BUTTONS populates the action bar on login and when SMSG_SUPERCEDED_SPELL upgrades spell ranks on the bar. Used by action bar addons (Bartender, Dominos) to refresh their displays. --- src/game/game_handler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 0c5073fb..dafb4316 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4592,6 +4592,7 @@ void GameHandler::handlePacket(network::Packet& packet) { } } LOG_INFO("SMSG_ACTION_BUTTONS: populated action bar from server"); + if (addonEventCallback_) addonEventCallback_("ACTIONBAR_SLOT_CHANGED", {}); packet.setReadPos(packet.getSize()); break; } @@ -19575,7 +19576,10 @@ void GameHandler::handleSupercededSpell(network::Packet& packet) { LOG_DEBUG("Action bar slot upgraded: spell ", oldSpellId, " -> ", newSpellId); } } - if (barChanged) saveCharacterConfig(); + if (barChanged) { + saveCharacterConfig(); + if (addonEventCallback_) addonEventCallback_("ACTIONBAR_SLOT_CHANGED", {}); + } // Show "Upgraded to X" only when the new spell wasn't already announced by the // trainer-buy handler. For non-trainer supersedes (e.g. quest rewards), the new