mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
game: implement SMSG_PET_SPELLS/MODE/BROKEN and pet action plumbing
SMSG_PET_SPELLS: Parse full packet — pet GUID, react/command state, 10 action bar slots, per-spell entries with autocast flags. Previously only read the GUID. SMSG_PET_MODE: Parse petGuid + mode uint32 (command low byte, react high byte) to keep stance state in sync after server updates. SMSG_PET_BROKEN: Clear pet state and show "Your pet has died." chat message. SMSG_PET_LEARNED_SPELL / SMSG_PET_UNLEARNED_SPELL: Maintain pet spell list incrementally. SMSG_PET_CAST_FAILED: Parse and log cast count + spell + reason. New state accessors: getPetActionSlot(), getPetCommand(), getPetReact(), getPetSpells(), isPetSpellAutocast(). CMSG_PET_ACTION: Add targetGuid (uint64) field — the wire format requires petGuid(8)+action(4)+targetGuid(8). Was sending an 12-byte packet instead of the required 20 bytes. sendPetAction(): New method that builds and sends CMSG_PET_ACTION with the correct target guid.
This commit is contained in:
parent
52c1fed6ab
commit
06a628dae2
4 changed files with 153 additions and 12 deletions
|
|
@ -1729,7 +1729,8 @@ public:
|
|||
/** CMSG_PET_ACTION packet builder */
|
||||
class PetActionPacket {
|
||||
public:
|
||||
static network::Packet build(uint64_t petGuid, uint32_t action);
|
||||
/** CMSG_PET_ACTION: petGuid + action + targetGuid (0 = no target) */
|
||||
static network::Packet build(uint64_t petGuid, uint32_t action, uint64_t targetGuid = 0);
|
||||
};
|
||||
|
||||
/** SMSG_CAST_FAILED data */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue