mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
feat: implement CMSG_PET_RENAME with rename dialog in pet frame
- Add PetRenamePacket::build(petGuid, name, isDeclined) builder - Add GameHandler::renamePet(newName) — sends packet via petGuid_ - Add 'Rename Pet' to pet frame context menu (right-click pet name) - Modal input dialog with 12-char limit matches server validation
This commit is contained in:
parent
9aa4b223dc
commit
bba2f20588
6 changed files with 60 additions and 0 deletions
|
|
@ -609,6 +609,7 @@ public:
|
|||
void cancelCast();
|
||||
void cancelAura(uint32_t spellId);
|
||||
void dismissPet();
|
||||
void renamePet(const std::string& newName);
|
||||
bool hasPet() const { return petGuid_ != 0; }
|
||||
uint64_t getPetGuid() const { return petGuid_; }
|
||||
|
||||
|
|
|
|||
|
|
@ -2718,5 +2718,14 @@ public:
|
|||
static network::Packet build(uint64_t stableMasterGuid, uint32_t petNumber);
|
||||
};
|
||||
|
||||
class PetRenamePacket {
|
||||
public:
|
||||
/** CMSG_PET_RENAME: rename the player's active pet.
|
||||
* petGuid: the pet's object GUID (from GameHandler::getPetGuid())
|
||||
* name: new name (max 12 chars; server validates and may reject)
|
||||
* isDeclined: 0 for non-Cyrillic locales (no declined name forms) */
|
||||
static network::Packet build(uint64_t petGuid, const std::string& name, uint8_t isDeclined = 0);
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
} // namespace wowee
|
||||
|
|
|
|||
|
|
@ -434,6 +434,10 @@ private:
|
|||
char gmTicketBuf_[2048] = {};
|
||||
void renderGmTicketWindow(game::GameHandler& gameHandler);
|
||||
|
||||
// Pet rename modal (triggered from pet frame context menu)
|
||||
bool petRenameOpen_ = false;
|
||||
char petRenameBuf_[16] = {};
|
||||
|
||||
// Inspect window
|
||||
bool showInspectWindow_ = false;
|
||||
void renderInspectWindow(game::GameHandler& gameHandler);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue