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

#include <InspectPackets.h>

Public Member Functions

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

std::vector< InspectItemDataItems
 
int32 ClassID = CLASS_NONE
 
int32 GenderID = GENDER_NONE
 
std::vector< uint16Talents
 
std::vector< uint16Glyphs
 
Optional< InspectGuildDataGuildData
 
ObjectGuid InspecteeGUID
 
int32 SpecializationID = 0
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Inspect::InspectResult::InspectResult ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1125

Member Function Documentation

WorldPacket const * WorldPackets::Inspect::InspectResult::Write ( )
overridevirtual

Implements WorldPackets::Packet.

75 {
77 
78  _worldPacket << uint32(Items.size());
79  _worldPacket << uint32(Glyphs.size());
80  _worldPacket << uint32(Talents.size());
81 
85 
86  for (size_t i = 0; i < Items.size(); ++i)
87  _worldPacket << Items[i];
88 
89  for (size_t i = 0; i < Glyphs.size(); ++i)
90  _worldPacket << uint16(Glyphs[i]);
91 
92  for (size_t i = 0; i < Talents.size(); ++i)
94 
95  _worldPacket.WriteBit(GuildData.is_initialized());
97 
98  if (GuildData)
100 
101  return &_worldPacket;
102 }
Optional< InspectGuildData > GuildData
Definition: InspectPackets.h:78
std::vector< uint16 > Glyphs
Definition: InspectPackets.h:77
int32 ClassID
Definition: InspectPackets.h:74
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
uint16_t uint16
Definition: g3dmath.h:166
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
int32 GenderID
Definition: InspectPackets.h:75
std::vector< uint16 > Talents
Definition: InspectPackets.h:76
std::vector< InspectItemData > Items
Definition: InspectPackets.h:73
int32 SpecializationID
Definition: InspectPackets.h:80
ObjectGuid InspecteeGUID
Definition: InspectPackets.h:79
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the caller graph for this function:

Member Data Documentation

int32 WorldPackets::Inspect::InspectResult::ClassID = CLASS_NONE
int32 WorldPackets::Inspect::InspectResult::GenderID = GENDER_NONE
std::vector<uint16> WorldPackets::Inspect::InspectResult::Glyphs
Optional<InspectGuildData> WorldPackets::Inspect::InspectResult::GuildData
ObjectGuid WorldPackets::Inspect::InspectResult::InspecteeGUID
std::vector<InspectItemData> WorldPackets::Inspect::InspectResult::Items
int32 WorldPackets::Inspect::InspectResult::SpecializationID = 0
std::vector<uint16> WorldPackets::Inspect::InspectResult::Talents

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