feat: implement pet stable system (MSG_LIST_STABLED_PETS, CMSG_STABLE_PET, CMSG_UNSTABLE_PET)

- Parse MSG_LIST_STABLED_PETS (SMSG): populate StabledPet list with
  petNumber, entry, level, name, displayId, and active status
- Detect stable master via gossip option text/keyword matching and
  auto-send MSG_LIST_STABLED_PETS request to open the stable UI
- Refresh list automatically after SMSG_STABLE_RESULT to reflect state
- New packet builders: ListStabledPetsPacket, StablePetPacket, UnstablePetPacket
- New public API: requestStabledPetList(), stablePet(slot), unstablePet(petNumber)
- Stable window UI: shows active/stabled pets with store/retrieve buttons,
  slot count, refresh, and close; opens when server sends pet list
- Clear stable state on world logout/disconnect
This commit is contained in:
Kelsi 2026-03-12 19:15:52 -07:00
parent 81b95b4af7
commit 284b98d93a
6 changed files with 285 additions and 0 deletions

View file

@ -5397,5 +5397,29 @@ bool AuctionCommandResultParser::parse(network::Packet& packet, AuctionCommandRe
return true;
}
// ============================================================
// Pet Stable System
// ============================================================
network::Packet ListStabledPetsPacket::build(uint64_t stableMasterGuid) {
network::Packet p(wireOpcode(Opcode::MSG_LIST_STABLED_PETS));
p.writeUInt64(stableMasterGuid);
return p;
}
network::Packet StablePetPacket::build(uint64_t stableMasterGuid, uint8_t slot) {
network::Packet p(wireOpcode(Opcode::CMSG_STABLE_PET));
p.writeUInt64(stableMasterGuid);
p.writeUInt8(slot);
return p;
}
network::Packet UnstablePetPacket::build(uint64_t stableMasterGuid, uint32_t petNumber) {
network::Packet p(wireOpcode(Opcode::CMSG_UNSTABLE_PET));
p.writeUInt64(stableMasterGuid);
p.writeUInt32(petNumber);
return p;
}
} // namespace game
} // namespace wowee