feat: handle SMSG_PET_RENAMEABLE to auto-open pet rename dialog on first tame

When the server sends SMSG_PET_RENAMEABLE (after taming a pet for the first
time), the pet rename modal now automatically opens so the player can name
their new pet without needing to right-click the pet frame.
This commit is contained in:
Kelsi 2026-03-17 20:59:29 -07:00
parent 113be66314
commit 5df5f4d423
3 changed files with 14 additions and 1 deletions

View file

@ -7661,10 +7661,14 @@ void GameHandler::handlePacket(network::Packet& packet) {
case Opcode::SMSG_PET_DISMISS_SOUND:
case Opcode::SMSG_PET_ACTION_SOUND:
case Opcode::SMSG_PET_UNLEARN_CONFIRM:
case Opcode::SMSG_PET_RENAMEABLE:
case Opcode::SMSG_PET_UPDATE_COMBO_POINTS:
packet.setReadPos(packet.getSize());
break;
case Opcode::SMSG_PET_RENAMEABLE:
// Server signals that the pet can now be named (first tame)
petRenameablePending_ = true;
packet.setReadPos(packet.getSize());
break;
case Opcode::SMSG_PET_NAME_INVALID:
addUIError("That pet name is invalid. Please choose a different name.");
addSystemChatMessage("That pet name is invalid. Please choose a different name.");