TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
QueryPackets.cpp File Reference
#include "QueryPackets.h"
#include "BattlenetAccountMgr.h"
#include "Player.h"
#include "World.h"
#include "ObjectMgr.h"
+ Include dependency graph for QueryPackets.cpp:

Functions

ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Query::PlayerGuidLookupHint const &lookupHint)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Query::PlayerGuidLookupData const &lookupData)
 
ByteBufferoperator<< (ByteBuffer &data, WorldPackets::Query::ItemTextCache const &itemTextCache)
 

Function Documentation

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Query::PlayerGuidLookupHint const lookupHint 
)
102 {
103  data.WriteBit(lookupHint.VirtualRealmAddress.is_initialized());
104  data.WriteBit(lookupHint.NativeRealmAddress.is_initialized());
105  data.FlushBits();
106 
107  if (lookupHint.VirtualRealmAddress)
108  data << uint32(*lookupHint.VirtualRealmAddress);
109 
110  if (lookupHint.NativeRealmAddress)
111  data << uint32(*lookupHint.NativeRealmAddress);
112 
113  return data;
114 }
void FlushBits()
Definition: ByteBuffer.h:150
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Query::PlayerGuidLookupData const lookupData 
)
159 {
160  data.WriteBit(lookupData.IsDeleted);
161  data.WriteBits(lookupData.Name.length(), 6);
162 
163  for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
164  data.WriteBits(lookupData.DeclinedNames.name[i].length(), 7);
165 
166  for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
167  data.WriteString(lookupData.DeclinedNames.name[i]);
168 
169  data << lookupData.AccountID;
170  data << lookupData.BnetAccountID;
171  data << lookupData.GuidActual;
172  data << uint32(lookupData.VirtualRealmAddress);
173  data << uint8(lookupData.Race);
174  data << uint8(lookupData.Sex);
175  data << uint8(lookupData.ClassID);
176  data << uint8(lookupData.Level);
177  data.WriteString(lookupData.Name);
178 
179  return data;
180 }
#define MAX_DECLINED_NAME_CASES
Definition: Unit.h:1099
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
uint8_t uint8
Definition: g3dmath.h:164
uint8_t uint8
Definition: Define.h:152
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function:

ByteBuffer& operator<< ( ByteBuffer data,
WorldPackets::Query::ItemTextCache const itemTextCache 
)
474 {
475  data.WriteBits(itemTextCache.Text.length(), 13);
476  data.FlushBits();
477 
478  data.WriteString(itemTextCache.Text);
479 
480  return data;
481 }
void FlushBits()
Definition: ByteBuffer.h:150
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

+ Here is the call graph for this function: