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

#include <VoidStoragePackets.h>

Public Member Functions

 VoidStorageContents ()
 
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< VoidItemItems
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::VoidStorage::VoidStorageContents::VoidStorageContents ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1617

Member Function Documentation

WorldPacket const * WorldPackets::VoidStorage::VoidStorageContents::Write ( )
overridevirtual

Implements WorldPackets::Packet.

53 {
54  _worldPacket.reserve(1 + Items.size() * sizeof(VoidItem));
55 
56  _worldPacket.WriteBits(Items.size(), 8);
58 
59  for (VoidItem const& voidItem : Items)
60  _worldPacket << voidItem;
61 
62  return &_worldPacket;
63 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
std::vector< VoidItem > Items
Definition: VoidStoragePackets.h:83
void reserve(size_t ressize)
Definition: ByteBuffer.h:597
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

std::vector<VoidItem> WorldPackets::VoidStorage::VoidStorageContents::Items

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