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

#include <QueryPackets.h>

Public Member Functions

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

ObjectGuid UnitGUID
 
bool Allow = false
 
bool HasDeclined = false
 
DeclinedName DeclinedNames
 
uint32 Timestamp = 0
 
std::string Name
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Query::QueryPetNameResponse::QueryPetNameResponse ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1400

Member Function Documentation

WorldPacket const * WorldPackets::Query::QueryPetNameResponse::Write ( )
overridevirtual

Implements WorldPackets::Packet.

444 {
447 
448  if (Allow)
449  {
450  _worldPacket.WriteBits(Name.length(), 8);
452 
453  for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
454  _worldPacket.WriteBits(DeclinedNames.name[i].length(), 7);
455 
456  for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
458 
461  }
462 
464 
465  return &_worldPacket;
466 }
ObjectGuid UnitGUID
Definition: QueryPackets.h:414
std::string Name
Definition: QueryPackets.h:420
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
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
bool Allow
Definition: QueryPackets.h:415
bool HasDeclined
Definition: QueryPackets.h:417
uint32 Timestamp
Definition: QueryPackets.h:419
uint8_t uint8
Definition: Define.h:152
std::string name[MAX_DECLINED_NAME_CASES]
Definition: Unit.h:1103
DeclinedName DeclinedNames
Definition: QueryPackets.h:418
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool WorldPackets::Query::QueryPetNameResponse::Allow = false
DeclinedName WorldPackets::Query::QueryPetNameResponse::DeclinedNames
bool WorldPackets::Query::QueryPetNameResponse::HasDeclined = false
std::string WorldPackets::Query::QueryPetNameResponse::Name
uint32 WorldPackets::Query::QueryPetNameResponse::Timestamp = 0
ObjectGuid WorldPackets::Query::QueryPetNameResponse::UnitGUID

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