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

#include <CombatPackets.h>

Public Member Functions

 PowerUpdate ()
 
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 Guid
 
std::vector< PowerUpdatePowerPowers
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::Combat::PowerUpdate::PowerUpdate ( )
inline
152 : ServerPacket(SMSG_POWER_UPDATE, 16 + 4 + 1) { }
ServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: Packet.h:49
Definition: Opcodes.h:1382

Member Function Documentation

WorldPacket const * WorldPackets::Combat::PowerUpdate::Write ( )
overridevirtual

Implements WorldPackets::Packet.

105 {
106  _worldPacket << Guid;
107  _worldPacket << uint32(Powers.size());
108  for (PowerUpdatePower const& power : Powers)
109  {
110  _worldPacket << power.Power;
111  _worldPacket << power.PowerType;
112  }
113 
114  return &_worldPacket;
115 }
ObjectGuid Guid
Definition: CombatPackets.h:156
WorldPacket _worldPacket
Definition: Packet.h:43
Powers
Definition: SharedDefines.h:246
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the caller graph for this function:

Member Data Documentation

ObjectGuid WorldPackets::Combat::PowerUpdate::Guid
std::vector<PowerUpdatePower> WorldPackets::Combat::PowerUpdate::Powers

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