mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 15:20:15 +00:00
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.
This commit is contained in:
parent
fc182f8653
commit
37a5b4c9d9
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue