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

#include <MiscPackets.h>

Public Member Functions

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

ObjectGuid ClientGUID
 
ObjectGuid PersonalGUID
 
std::set< uint32PhaseShifts
 
std::set< uint32PreloadMapIDs
 
std::set< uint32UiWorldMapAreaIDSwaps
 
std::set< uint32VisibleMapIDs
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Misc::PhaseShift::PhaseShift ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1365

Member Function Documentation

WorldPacket const * WorldPackets::Misc::PhaseShift::Write ( )
overridevirtual

Implements WorldPackets::Packet.

388 {
389  _worldPacket << ClientGUID; // CLientGUID
390  _worldPacket << uint32(PhaseShifts.size() ? 0 : 8); // PhaseShiftFlags
391  _worldPacket << uint32(PhaseShifts.size()); // PhaseShiftCount
392  _worldPacket << PersonalGUID; // PersonalGUID
393  for (uint32 phase : PhaseShifts)
394  {
395  _worldPacket << uint16(1); // PhaseFlags
396  _worldPacket << uint16(phase); // PhaseID
397  }
398 
399  _worldPacket << uint32(VisibleMapIDs.size() * 2); // Active terrain swaps size
400  for (uint32 map : VisibleMapIDs)
401  _worldPacket << uint16(map); // Active terrain swap map id
402 
403  _worldPacket << uint32(PreloadMapIDs.size() * 2); // Inactive terrain swaps size
404  for (uint32 map : PreloadMapIDs)
405  _worldPacket << uint16(map); // Inactive terrain swap map id
406 
407  _worldPacket << uint32(UiWorldMapAreaIDSwaps.size() * 2); // UI map swaps size
408  for (uint32 map : UiWorldMapAreaIDSwaps)
409  _worldPacket << uint16(map); // UI map id, WorldMapArea.dbc, controls map display
410 
411  return &_worldPacket;
412 }
std::set< uint32 > PreloadMapIDs
Definition: MiscPackets.h:556
WorldPacket _worldPacket
Definition: Packet.h:43
uint16_t uint16
Definition: g3dmath.h:166
std::set< uint32 > PhaseShifts
Definition: MiscPackets.h:555
uint32_t uint32
Definition: Define.h:150
std::set< uint32 > UiWorldMapAreaIDSwaps
Definition: MiscPackets.h:557
std::set< uint32 > VisibleMapIDs
Definition: MiscPackets.h:558
uint32_t uint32
Definition: g3dmath.h:168
ObjectGuid PersonalGUID
Definition: MiscPackets.h:554
ObjectGuid ClientGUID
Definition: MiscPackets.h:553

+ Here is the caller graph for this function:

Member Data Documentation

ObjectGuid WorldPackets::Misc::PhaseShift::ClientGUID
ObjectGuid WorldPackets::Misc::PhaseShift::PersonalGUID
std::set<uint32> WorldPackets::Misc::PhaseShift::PhaseShifts
std::set<uint32> WorldPackets::Misc::PhaseShift::PreloadMapIDs
std::set<uint32> WorldPackets::Misc::PhaseShift::UiWorldMapAreaIDSwaps
std::set<uint32> WorldPackets::Misc::PhaseShift::VisibleMapIDs

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