mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
8f08d75748
commit
4272491d56
3 changed files with 61 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue