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

#include <EquipmentSetPackets.h>

Public Member Functions

 LoadEquipmentSet ()
 
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
< EquipmentSetInfo::EquipmentSetData
const * > 
SetData
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::EquipmentSet::LoadEquipmentSet::LoadEquipmentSet ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1190

Member Function Documentation

WorldPacket const * WorldPackets::EquipmentSet::LoadEquipmentSet::Write ( )
overridevirtual

Implements WorldPackets::Packet.

29 {
30  _worldPacket << uint32(SetData.size());
31 
32  for (EquipmentSetInfo::EquipmentSetData const* equipSet : SetData)
33  {
34  _worldPacket << uint64(equipSet->Guid);
35  _worldPacket << uint32(equipSet->SetID);
36  _worldPacket << uint32(equipSet->IgnoreMask);
37 
38  for (ObjectGuid const& guid : equipSet->Pieces)
39  _worldPacket << guid;
40 
41  _worldPacket.WriteBits(equipSet->SetName.length(), 8);
42  _worldPacket.WriteBits(equipSet->SetIcon.length(), 9);
44 
45  _worldPacket.WriteString(equipSet->SetName);
46  _worldPacket.WriteString(equipSet->SetIcon);
47  }
48 
49  return &_worldPacket;
50 }
void FlushBits()
Definition: ByteBuffer.h:150
uint64_t uint64
Definition: g3dmath.h:170
WorldPacket _worldPacket
Definition: Packet.h:43
SetData
Definition: boss_nethekurse.cpp:62
void WriteString(std::string const &str)
Definition: ByteBuffer.h:540
Definition: ObjectGuid.h:189
uint32_t uint32
Definition: g3dmath.h:168
void WriteBits(T value, int32 bits)
Definition: ByteBuffer.h:198

Member Data Documentation

std::vector<EquipmentSetInfo::EquipmentSetData const*> WorldPackets::EquipmentSet::LoadEquipmentSet::SetData

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