feat: send CMSG_SET_ACTION_BUTTON to server when action bar slot changes

Action bar changes (dragging spells/items) were only saved locally.
Now notifies the server via CMSG_SET_ACTION_BUTTON so the layout
persists across relogs. Supports Classic (5-byte) and TBC/WotLK
(packed uint32) wire formats.
This commit is contained in:
Kelsi 2026-03-13 04:25:05 -07:00
parent 8f08d75748
commit 4272491d56
3 changed files with 61 additions and 0 deletions

View file

@ -16101,6 +16101,16 @@ void GameHandler::setActionBarSlot(int slot, ActionBarSlot::Type type, uint32_t
queryItemInfo(id, 0);
}
saveCharacterConfig();
// Notify the server so the action bar persists across relogs.
if (state == WorldState::IN_WORLD && socket) {
const bool classic = isClassicLikeExpansion();
auto pkt = SetActionButtonPacket::build(
static_cast<uint8_t>(slot),
static_cast<uint8_t>(type),
id,
classic);
socket->send(pkt);
}
}
float GameHandler::getSpellCooldown(uint32_t spellId) const {