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

#include <QueryPackets.h>

Public Member Functions

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

uint32 GameObjectID = 0
 
bool Allow = false
 
GameObjectStats Stats
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements WorldPackets::Packet.

291 {
295 
296  if (Allow)
297  {
298  uint32 dataSize = Stats.GetDataSize();
299 
300  _worldPacket << uint32(dataSize);
301  if (dataSize)
302  {
303  _worldPacket << Stats.Type;
304  _worldPacket << Stats.DisplayID;
305  for (int8 i = 0; i < 4; i++)
306  _worldPacket << Stats.Name[i];
307 
308  _worldPacket << Stats.IconName;
309  _worldPacket << Stats.CastBarCaption;
310  _worldPacket << Stats.UnkString;
311 
312  for (uint32 i = 0; i < MAX_GAMEOBJECT_DATA; i++)
313  _worldPacket << Stats.Data[i];
314 
315  _worldPacket << Stats.Size;
316 
317  _worldPacket << uint8(Stats.QuestItems.size());
318  for (int32 questItem : Stats.QuestItems)
319  _worldPacket << questItem;
320 
321  _worldPacket << Stats.Expansion;
322  }
323  }
324 
325  return &_worldPacket;
326 }
int8_t int8
Definition: Define.h:148
bool Allow
Definition: QueryPackets.h:255
Stats
Definition: SharedDefines.h:235
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint32 GameObjectID
Definition: QueryPackets.h:254
uint8_t uint8
Definition: Define.h:152
uint32_t uint32
Definition: g3dmath.h:168
#define MAX_GAMEOBJECT_DATA
Definition: SharedDefines.h:2117

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool WorldPackets::Query::QueryGameObjectResponse::Allow = false
uint32 WorldPackets::Query::QueryGameObjectResponse::GameObjectID = 0
GameObjectStats WorldPackets::Query::QueryGameObjectResponse::Stats

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