TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::BattlePet::BattlePetJournal Class Referencefinal

#include <BattlePetPackets.h>

Public Member Functions

 BattlePetJournal ()
 
WorldPacket constWrite () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
void Read () overridefinal
 
void Clear ()
 
WorldPacket && Move ()
 
OpcodeServer GetOpcode () const
 
- Public Member Functions inherited from WorldPackets::Packet
 Packet (WorldPacket &&worldPacket)
 
virtual ~Packet ()=default
 
 Packet (Packet const &right)=delete
 
Packetoperator= (Packet const &right)=delete
 
WorldPacket constGetRawPacket () const
 
size_t GetSize () const
 
ConnectionType GetConnection () const
 

Public Attributes

uint16 Trap = 0
 
std::vector< BattlePetSlotSlots
 
std::vector< BattlePetPets
 
bool HasJournalLock = true
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::BattlePet::BattlePetJournal::BattlePetJournal ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:813

Member Function Documentation

WorldPacket const * WorldPackets::BattlePet::BattlePetJournal::Write ( )
overridevirtual

Implements WorldPackets::Packet.

65 {
67  _worldPacket << uint32(Slots.size());
68  _worldPacket << uint32(Pets.size());
69 
70  for (auto const& slot : Slots)
71  _worldPacket << slot;
72 
73  for (auto const& pet : Pets)
74  _worldPacket << pet;
75 
78 
79  return &_worldPacket;
80 }
std::vector< BattlePetSlot > Slots
Definition: BattlePetPackets.h:64
void FlushBits()
Definition: ByteBuffer.h:150
std::vector< BattlePet > Pets
Definition: BattlePetPackets.h:65
WorldPacket _worldPacket
Definition: Packet.h:43
uint16_t uint16
Definition: g3dmath.h:166
bool HasJournalLock
Definition: BattlePetPackets.h:66
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint32_t uint32
Definition: g3dmath.h:168
uint16 Trap
Definition: BattlePetPackets.h:63

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool WorldPackets::BattlePet::BattlePetJournal::HasJournalLock = true
std::vector<BattlePet> WorldPackets::BattlePet::BattlePetJournal::Pets
std::vector<BattlePetSlot> WorldPackets::BattlePet::BattlePetJournal::Slots
uint16 WorldPackets::BattlePet::BattlePetJournal::Trap = 0

The documentation for this class was generated from the following files: