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

#include <WorldStatePackets.h>

Classes

struct  WorldStateInfo
 

Public Member Functions

 InitWorldStates ()
 
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 AreaID = 0
 ZoneId. More...
 
uint32 SubareaID = 0
 AreaId. More...
 
uint32 MapID = 0
 MapId. More...
 
std::list< WorldStateInfoWorldstates
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::WorldState::InitWorldStates::InitWorldStates ( )
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1122

Member Function Documentation

WorldPacket const * WorldPackets::WorldState::InitWorldStates::Write ( )
overridevirtual

Implements WorldPackets::Packet.

24 {
25  _worldPacket.reserve(16 + Worldstates.size() * 8);
26 
30 
31  _worldPacket << uint32(Worldstates.size());
32  for (WorldStateInfo const& wsi : Worldstates)
33  {
34  _worldPacket << uint32(wsi.VariableID);
35  _worldPacket << int32(wsi.Value);
36  }
37 
38  return &_worldPacket;
39 }
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
WorldPacket _worldPacket
Definition: Packet.h:43
uint32 MapID
MapId.
Definition: WorldStatePackets.h:45
void reserve(size_t ressize)
Definition: ByteBuffer.h:597
uint32 SubareaID
AreaId.
Definition: WorldStatePackets.h:44
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
uint32 AreaID
ZoneId.
Definition: WorldStatePackets.h:43

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32 WorldPackets::WorldState::InitWorldStates::AreaID = 0

ZoneId.

uint32 WorldPackets::WorldState::InitWorldStates::MapID = 0

MapId.

uint32 WorldPackets::WorldState::InitWorldStates::SubareaID = 0

AreaId.

std::list<WorldStateInfo> WorldPackets::WorldState::InitWorldStates::Worldstates

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