game: implement dual-spec switch via CMSG_SET_ACTIVE_TALENT_GROUP (0x4C3)

switchTalentSpec() was only updating local state without notifying the
server, leaving the server out of sync with the client's active talent
group. Now sends CMSG_SET_ACTIVE_TALENT_GROUP_OBSOLETE (WotLK wire
opcode 0x4C3) with the target group index (0=primary, 1=secondary),
prompting the server to apply the spec swap and respond with a fresh
SMSG_TALENTS_INFO for the newly active group.

Also adds ActivateTalentGroupPacket::build() to world_packets for the
packet construction.
This commit is contained in:
Kelsi 2026-03-09 22:49:23 -07:00
parent d339734143
commit 52c1fed6ab
3 changed files with 25 additions and 3 deletions

View file

@ -2266,6 +2266,13 @@ public:
static network::Packet build(bool accept);
};
/** CMSG_SET_ACTIVE_TALENT_GROUP_OBSOLETE (0x4C3) — switch dual-spec talent group */
class ActivateTalentGroupPacket {
public:
/** @param group 0 = primary spec, 1 = secondary spec */
static network::Packet build(uint32_t group);
};
// ============================================================
// Taxi / Flight Paths
// ============================================================