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

#include <MovementPackets.h>

Classes

struct  ShipTransferPending
 

Public Member Functions

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

int32 MapID = -1
 
Optional< ShipTransferPendingShip
 
Optional< int32TransferSpellID
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Movement::TransferPending::TransferPending ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1584

Member Function Documentation

WorldPacket const * WorldPackets::Movement::TransferPending::Write ( )
overridevirtual

Implements WorldPackets::Packet.

478 {
480  _worldPacket.WriteBit(Ship.is_initialized());
481  _worldPacket.WriteBit(TransferSpellID.is_initialized());
482  if (Ship)
483  {
484  _worldPacket << uint32(Ship->ID);
485  _worldPacket << int32(Ship->OriginMapID);
486  }
487 
488  if (TransferSpellID)
490 
492 
493  return &_worldPacket;
494 }
void FlushBits()
Definition: ByteBuffer.h:150
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
Optional< int32 > TransferSpellID
Definition: MovementPackets.h:191
Optional< ShipTransferPending > Ship
Definition: MovementPackets.h:190
int32 MapID
Definition: MovementPackets.h:189
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168

Member Data Documentation

int32 WorldPackets::Movement::TransferPending::MapID = -1
Optional<ShipTransferPending> WorldPackets::Movement::TransferPending::Ship
Optional<int32> WorldPackets::Movement::TransferPending::TransferSpellID

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