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

#include <SpellPackets.h>

Public Member Functions

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

bool InitialLogin = false
 
std::vector< uint32KnownSpells
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Spells::SendKnownSpells::SendKnownSpells ( )
inline
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1482

Member Function Documentation

WorldPacket const * WorldPackets::Spells::SendKnownSpells::Write ( )
overridevirtual

Implements WorldPackets::Packet.

54 {
55  _worldPacket.reserve(1 + 4 * KnownSpells.size());
56 
58  _worldPacket << uint32(KnownSpells.size());
59 
60  for (uint32 spellId : KnownSpells)
61  _worldPacket << uint32(spellId);
62 
63  return &_worldPacket;
64 }
std::vector< uint32 > KnownSpells
Definition: SpellPackets.h:122
WorldPacket _worldPacket
Definition: Packet.h:43
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
bool InitialLogin
Definition: SpellPackets.h:121
uint32_t uint32
Definition: Define.h:150
void reserve(size_t ressize)
Definition: ByteBuffer.h:597
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

Member Data Documentation

bool WorldPackets::Spells::SendKnownSpells::InitialLogin = false
std::vector<uint32> WorldPackets::Spells::SendKnownSpells::KnownSpells

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