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

#include <TalentPackets.h>

Public Member Functions

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

TalentInfoUpdate Info
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Talent::UpdateTalentData::UpdateTalentData ( )
inline
44 : ServerPacket(SMSG_UPDATE_TALENT_DATA, 2+4+4+4+12) { }
Definition: Opcodes.h:1602
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49

Member Function Documentation

WorldPacket const * WorldPackets::Talent::UpdateTalentData::Write ( )
overridevirtual

Implements WorldPackets::Packet.

21 {
24 
25  for (auto& talentGroupInfo : Info.TalentGroups)
26  {
27  _worldPacket << talentGroupInfo.SpecID;
28  _worldPacket << uint32(talentGroupInfo.TalentIDs.size());
29 
30  for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
31  _worldPacket << talentGroupInfo.GlyphIDs[i];
32 
33  for (uint16 talentID : talentGroupInfo.TalentIDs)
34  _worldPacket << talentID;
35  }
36 
37  return &_worldPacket;
38 }
std::vector< TalentGroupInfo > TalentGroups
Definition: TalentPackets.h:38
WorldPacket _worldPacket
Definition: Packet.h:43
TalentInfoUpdate Info
Definition: TalentPackets.h:48
#define MAX_GLYPH_SLOT_INDEX
Definition: SharedDefines.h:854
uint32_t uint32
Definition: Define.h:150
uint16_t uint16
Definition: Define.h:151
uint32_t uint32
Definition: g3dmath.h:168
uint8 ActiveGroup
Definition: TalentPackets.h:37

Member Data Documentation

TalentInfoUpdate WorldPackets::Talent::UpdateTalentData::Info

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