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

#include <PetPackets.h>

Public Member Functions

 PetNameInvalid ()
 
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

PetRenameData RenameData
 
uint8 Result = 0
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Pet::PetNameInvalid::PetNameInvalid ( )
inline
173 : ServerPacket(SMSG_PET_NAME_INVALID, 18 + 4 + 2 + 1 + 5 * 2 + 2) { }
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1358

Member Function Documentation

WorldPacket const * WorldPackets::Pet::PetNameInvalid::Write ( )
overridevirtual

Implements WorldPackets::Packet.

96 {
99 
100  _worldPacket << uint8(RenameData.NewName.length());
101 
104 
106  {
107  for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
108  {
111  }
112 
113  for (int32 i = 0; i < MAX_DECLINED_NAME_CASES; i++)
115  }
116 
118  return &_worldPacket;
119 }
int32 PetNumber
Definition: PetPackets.h:164
void FlushBits()
Definition: ByteBuffer.h:150
#define MAX_DECLINED_NAME_CASES
Definition: Unit.h:1099
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
PetRenameData RenameData
Definition: PetPackets.h:177
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
ObjectGuid PetGUID
Definition: PetPackets.h:163
int32_t int32
Definition: Define.h:146
uint8_t uint8
Definition: g3dmath.h:164
int32_t int32
Definition: g3dmath.h:167
bool HasDeclinedNames
Definition: PetPackets.h:166
std::string NewName
Definition: PetPackets.h:165
std::string name[MAX_DECLINED_NAME_CASES]
Definition: Unit.h:1103
DeclinedName DeclinedNames
Definition: PetPackets.h:167
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the caller graph for this function:

Member Data Documentation

PetRenameData WorldPackets::Pet::PetNameInvalid::RenameData
uint8 WorldPackets::Pet::PetNameInvalid::Result = 0

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