AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
WorldPackets::Misc::LevelUpInfo Class Referencefinal

#include "MiscPackets.h"

Inheritance diagram for WorldPackets::Misc::LevelUpInfo:
WorldPackets::ServerPacket WorldPackets::Packet

Public Member Functions

 LevelUpInfo ()
 
WorldPacket const * Write () override
 
- Public Member Functions inherited from WorldPackets::ServerPacket
 ServerPacket (OpcodeServer opcode, std::size_t initialSize=200)
 
void Read () final
 
void Clear ()
 
WorldPacket && Move ()
 
void ShrinkToFit ()
 
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
 
virtual WorldPacket const * Write ()=0
 
virtual void Read ()=0
 
WorldPacket const * GetRawPacket () const
 
std::size_t GetSize () const
 

Public Attributes

uint32 Level = 0
 
uint32 HealthDelta = 0
 
std::array< uint32, MAX_POWERSPowerDelta = { }
 
std::array< uint32, MAX_STATSStatDelta = { }
 

Additional Inherited Members

- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Detailed Description

Constructor & Destructor Documentation

◆ LevelUpInfo()

WorldPackets::Misc::LevelUpInfo::LevelUpInfo ( )
inline
@ SMSG_LEVELUP_INFO
Definition: Opcodes.h:498
ServerPacket(OpcodeServer opcode, std::size_t initialSize=200)
Definition: Packet.cpp:25

Member Function Documentation

◆ Write()

WorldPacket const * WorldPackets::Misc::LevelUpInfo::Write ( )
overridevirtual

Implements WorldPackets::Packet.

35{
38
39 for (uint32 power : PowerDelta)
40 _worldPacket << power;
41
42 for (uint32 stat : StatDelta)
43 _worldPacket << stat;
44
45 return &_worldPacket;
46}
std::uint32_t uint32
Definition: Define.h:107
WorldPacket _worldPacket
Definition: Packet.h:42
uint32 Level
Definition: MiscPackets.h:51
std::array< uint32, MAX_STATS > StatDelta
Definition: MiscPackets.h:54
std::array< uint32, MAX_POWERS > PowerDelta
Definition: MiscPackets.h:53
uint32 HealthDelta
Definition: MiscPackets.h:52

Referenced by Player::GiveLevel().

Member Data Documentation

◆ HealthDelta

uint32 WorldPackets::Misc::LevelUpInfo::HealthDelta = 0

Referenced by Player::GiveLevel().

◆ Level

uint32 WorldPackets::Misc::LevelUpInfo::Level = 0

Referenced by Player::GiveLevel().

◆ PowerDelta

std::array<uint32, MAX_POWERS> WorldPackets::Misc::LevelUpInfo::PowerDelta = { }

Referenced by Player::GiveLevel().

◆ StatDelta

std::array<uint32, MAX_STATS> WorldPackets::Misc::LevelUpInfo::StatDelta = { }

Referenced by Player::GiveLevel().