OregonCore  revision 3611e8a-git
Your Favourite TBC server
WorldPacket Class Reference

#include <WorldPacket.h>

+ Inheritance diagram for WorldPacket:

Public Member Functions

 WorldPacket ()
 
 WorldPacket (uint16 opcode, size_t res=200)
 
 WorldPacket (const WorldPacket &packet)
 
void Initialize (uint16 opcode, size_t newres=200)
 
uint16 GetOpcode () const
 
void SetOpcode (uint16 opcode)
 
- Public Member Functions inherited from ByteBuffer
 ByteBuffer ()
 
 ByteBuffer (size_t res)
 
 ByteBuffer (const ByteBuffer &buf)
 
void clear ()
 
template<typename T >
void put (size_t pos, T value)
 
ByteBufferoperator<< (uint8 value)
 
ByteBufferoperator<< (uint16 value)
 
ByteBufferoperator<< (uint32 value)
 
ByteBufferoperator<< (uint64 value)
 
ByteBufferoperator<< (int8 value)
 
ByteBufferoperator<< (int16 value)
 
ByteBufferoperator<< (int32 value)
 
ByteBufferoperator<< (int64 value)
 
ByteBufferoperator<< (float value)
 
ByteBufferoperator<< (double value)
 
ByteBufferoperator<< (const std::string &value)
 
ByteBufferoperator<< (const char *str)
 
ByteBufferoperator>> (bool &value)
 
ByteBufferoperator>> (uint8 &value)
 
ByteBufferoperator>> (uint16 &value)
 
ByteBufferoperator>> (uint32 &value)
 
ByteBufferoperator>> (uint64 &value)
 
ByteBufferoperator>> (int8 &value)
 
ByteBufferoperator>> (int16 &value)
 
ByteBufferoperator>> (int32 &value)
 
ByteBufferoperator>> (int64 &value)
 
ByteBufferoperator>> (float &value)
 
ByteBufferoperator>> (double &value)
 
ByteBufferoperator>> (std::string &value)
 
template<class T >
ByteBufferoperator>> (Unused< T > const &)
 
uint8 operator[] (size_t pos) const
 
size_t rpos () const
 
size_t rpos (size_t rpos_)
 
size_t wpos () const
 
size_t wpos (size_t wpos_)
 
template<typename T >
void read_skip ()
 
void read_skip (size_t skip)
 
template<typename T >
read ()
 
template<typename T >
read (size_t pos) const
 
void read (uint8 *dest, size_t len)
 
uint64 readPackGUID ()
 
const uint8contents () const
 
size_t size () const
 
bool empty () const
 
void resize (size_t newsize)
 
void reserve (size_t ressize)
 
void append (const std::string &str)
 
void append (const char *src, size_t cnt)
 
template<class T >
void append (const T *src, size_t cnt)
 
void append (const uint8 *src, size_t cnt)
 
void append (const ByteBuffer &buffer)
 
void appendPackXYZ (float x, float y, float z)
 
void appendPackGUID (uint64 guid)
 
void put (size_t pos, const uint8 *src, size_t cnt)
 
void print_storage () const
 
void textlike () const
 
void hexlike () const
 
template<>
void read_skip ()
 
template<>
void read_skip ()
 

Protected Attributes

uint16 m_opcode
 
- Protected Attributes inherited from ByteBuffer
size_t _rpos
 
size_t _wpos
 
std::vector< uint8_storage
 

Additional Inherited Members

- Static Public Attributes inherited from ByteBuffer
static const size_t DEFAULT_SIZE = 0x1000
 

Detailed Description

Definition at line 24 of file WorldPacket.h.

Constructor & Destructor Documentation

WorldPacket::WorldPacket ( )
inline

Definition at line 28 of file WorldPacket.h.

28  : ByteBuffer(0), m_opcode(0)
29  {
30  }
uint16 m_opcode
Definition: WorldPacket.h:54
WorldPacket::WorldPacket ( uint16  opcode,
size_t  res = 200 
)
inlineexplicit

Definition at line 31 of file WorldPacket.h.

31 : ByteBuffer(res), m_opcode(opcode) { }
uint16 m_opcode
Definition: WorldPacket.h:54
WorldPacket::WorldPacket ( const WorldPacket packet)
inline

Definition at line 33 of file WorldPacket.h.

33  : ByteBuffer(packet), m_opcode(packet.m_opcode)
34  {
35  }
uint16 m_opcode
Definition: WorldPacket.h:54

Member Function Documentation

void WorldPacket::Initialize ( uint16  opcode,
size_t  newres = 200 
)
inline

Definition at line 37 of file WorldPacket.h.

References ByteBuffer::_storage, ByteBuffer::clear(), and m_opcode.

Referenced by AddonHandler::BuildAddonPacket(), BattlegroundMgr::BuildBattlegroundListPacket(), BattlegroundMgr::BuildBattlegroundStatusPacket(), BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(), Unit::BuildHeartBeatMsg(), CreatureTextMgr::BuildMonsterChat(), WorldSession::BuildPartyMemberStatsChangedPacket(), BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(), BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(), BattlegroundMgr::BuildPlaySoundPacket(), BattlegroundMgr::BuildPvpLogDataPacket(), Player::BuildTeleportAckMsg(), BattlegroundMgr::BuildUpdateWorldStatePacket(), Group::Disband(), Player::DuelComplete(), Spell::EffectBind(), ChatHandler::FillMessageData(), WorldSocket::HandleAuthSession(), WorldSession::HandleLogoutCancelOpcode(), ChatHandler::HandleModifyMountCommand(), WorldSession::HandlePlayerLogin(), WorldSession::HandleReadItem(), WorldSession::HandleTextEmoteOpcode(), WorldSession::HandleTrainerBuySpellOpcode(), WorldSession::HandleTurnInPetitionOpcode(), Channel::JoinNotify(), SocialMgr::MakeFriendStatusPacket(), Channel::MakeNotifyPacket(), ChannelMgr::MakeNotOnPacket(), Group::RemoveMember(), ReputationMgr::SendForceReactions(), Player::SendInitialPacketsBeforeAddToMap(), Spell::SendInterrupted(), Player::SendSavedInstances(), WorldSession::SendTradeStatus(), Player::SetCanFly(), Player::SetFeatherFall(), Player::SetHover(), Unit::SetSpeed(), Player::SetWaterWalking(), Player::TeleportTo(), Aura::UpdateAuraDuration(), and Player::Whisper().

38  {
39  clear();
40  _storage.reserve(newres);
41  m_opcode = opcode;
42  }
uint16 m_opcode
Definition: WorldPacket.h:54
std::vector< uint8 > _storage
Definition: ByteBuffer.h:507
void clear()
Definition: ByteBuffer.h:73
void WorldPacket::SetOpcode ( uint16  opcode)
inline

Member Data Documentation

uint16 WorldPacket::m_opcode
protected

Definition at line 54 of file WorldPacket.h.

Referenced by GetOpcode(), Initialize(), and SetOpcode().


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