mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 01:00:13 +00:00
feat: handle SMSG_PET_UNLEARN_CONFIRM with pet talent respec dialog
Parses the pet talent wipe confirm packet (petGuid + cost), shows a confirmation dialog matching the player talent reset UX, and sends CMSG_PET_UNLEARN_TALENTS on confirmation. Completes the pet talent respec flow for Hunters/Warlocks on WotLK servers.
This commit is contained in:
parent
67c8101f67
commit
49ba89dfc3
4 changed files with 103 additions and 1 deletions
|
|
@ -7660,7 +7660,16 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
case Opcode::SMSG_PET_GUIDS:
|
||||
case Opcode::SMSG_PET_DISMISS_SOUND:
|
||||
case Opcode::SMSG_PET_ACTION_SOUND:
|
||||
case Opcode::SMSG_PET_UNLEARN_CONFIRM:
|
||||
case Opcode::SMSG_PET_UNLEARN_CONFIRM: {
|
||||
// uint64 petGuid + uint32 cost (copper)
|
||||
if (packet.getSize() - packet.getReadPos() >= 12) {
|
||||
petUnlearnGuid_ = packet.readUInt64();
|
||||
petUnlearnCost_ = packet.readUInt32();
|
||||
petUnlearnPending_ = true;
|
||||
}
|
||||
packet.setReadPos(packet.getSize());
|
||||
break;
|
||||
}
|
||||
case Opcode::SMSG_PET_UPDATE_COMBO_POINTS:
|
||||
packet.setReadPos(packet.getSize());
|
||||
break;
|
||||
|
|
@ -18867,6 +18876,20 @@ void GameHandler::switchTalentSpec(uint8_t newSpec) {
|
|||
addSystemChatMessage(msg);
|
||||
}
|
||||
|
||||
void GameHandler::confirmPetUnlearn() {
|
||||
if (!petUnlearnPending_) return;
|
||||
petUnlearnPending_ = false;
|
||||
if (state != WorldState::IN_WORLD || !socket) return;
|
||||
|
||||
// Respond with CMSG_PET_UNLEARN_TALENTS (no payload in 3.3.5a)
|
||||
network::Packet pkt(wireOpcode(Opcode::CMSG_PET_UNLEARN_TALENTS));
|
||||
socket->send(pkt);
|
||||
LOG_INFO("confirmPetUnlearn: sent CMSG_PET_UNLEARN_TALENTS");
|
||||
addSystemChatMessage("Pet talent reset confirmed.");
|
||||
petUnlearnGuid_ = 0;
|
||||
petUnlearnCost_ = 0;
|
||||
}
|
||||
|
||||
void GameHandler::confirmTalentWipe() {
|
||||
if (!talentWipePending_) return;
|
||||
talentWipePending_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue