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

#include <CombatLogPackets.h>

Public Member Functions

 AttackerStateUpdate ()
 
WorldPacket constWrite () override
 
- Public Member Functions inherited from WorldPackets::CombatLog::CombatLogServerPacket
 CombatLogServerPacket (OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
 
WorldPacket constGetFullLogPacket () const
 
WorldPacket constGetBasicLogPacket () const
 
- 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

uint32 HitInfo = 0
 
ObjectGuid AttackerGUID
 
ObjectGuid VictimGUID
 
int32 Damage = 0
 
int32 OverDamage = -1
 
Optional< SubDamageSubDmg
 
uint8 VictimState = 0
 
int32 AttackerState = -1
 
int32 MeleeSpellID = 0
 
int32 BlockAmount = 0
 
int32 RageGained = 0
 
UnkAttackerState UnkState
 
float Unk = 0.0f
 
- Public Attributes inherited from WorldPackets::CombatLog::CombatLogServerPacket
Spells::SpellCastLogData LogData
 

Additional Inherited Members

- Protected Member Functions inherited from WorldPackets::CombatLog::CombatLogServerPacket
template<typename T >
void operator<< (T const &val)
 
void WriteLogDataBit ()
 
void FlushBits ()
 
bool WriteBit (bool bit)
 
void WriteBits (uint32 value, uint32 bitCount)
 
ByteBufferWriteLogData ()
 
- Protected Attributes inherited from WorldPackets::CombatLog::CombatLogServerPacket
WorldPacket _fullLogPacket
 
- Protected Attributes inherited from WorldPackets::Packet
WorldPacket _worldPacket
 

Constructor & Destructor Documentation

WorldPackets::CombatLog::AttackerStateUpdate::AttackerStateUpdate ( )
inline
Definition: Opcodes.h:755
CombatLogServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: CombatLogPackets.h:32

Member Function Documentation

WorldPacket const * WorldPackets::CombatLog::AttackerStateUpdate::Write ( )
overridevirtual

Implements WorldPackets::Packet.

281 {
282  ByteBuffer attackRoundInfo;
283  attackRoundInfo << HitInfo;
284  attackRoundInfo << AttackerGUID;
285  attackRoundInfo << VictimGUID;
286  attackRoundInfo << Damage;
287  attackRoundInfo << OverDamage;
288 
289  if (attackRoundInfo.WriteBit(SubDmg.is_initialized()))
290  {
291  attackRoundInfo << SubDmg->SchoolMask;
292  attackRoundInfo << SubDmg->FDamage;
293  attackRoundInfo << SubDmg->Damage;
295  attackRoundInfo << SubDmg->Absorbed;
297  attackRoundInfo << SubDmg->Resisted;
298  }
299 
300  attackRoundInfo << VictimState;
301  attackRoundInfo << AttackerState;
302  attackRoundInfo << MeleeSpellID;
303  if (HitInfo & HITINFO_BLOCK)
304  attackRoundInfo << BlockAmount;
305 
306  if (HitInfo & HITINFO_RAGE_GAIN)
307  attackRoundInfo << RageGained;
308 
309  if (HitInfo & HITINFO_UNK1)
310  {
311  attackRoundInfo << UnkState.State1;
312  attackRoundInfo << UnkState.State2;
313  attackRoundInfo << UnkState.State3;
314  attackRoundInfo << UnkState.State4;
315  attackRoundInfo << UnkState.State5;
316  attackRoundInfo << UnkState.State6;
317  attackRoundInfo << UnkState.State7;
318  attackRoundInfo << UnkState.State8;
319  attackRoundInfo << UnkState.State9;
320  attackRoundInfo << UnkState.State10;
321  attackRoundInfo << UnkState.State11;
322  attackRoundInfo << UnkState.State12;
323  }
324  if (HitInfo & (HITINFO_BLOCK | HITINFO_UNK12))
325  attackRoundInfo << Unk;
326 
327  WriteLogDataBit();
328  FlushBits();
329  WriteLogData();
330 
331  *this << uint32(attackRoundInfo.size());
332  _worldPacket.append(attackRoundInfo);
333  _fullLogPacket.append(attackRoundInfo);
334 
335  return &_worldPacket;
336 }
Optional< SubDamage > SubDmg
Definition: CombatLogPackets.h:357
float State5
Definition: CombatLogPackets.h:335
Definition: ByteBuffer.h:70
float State3
Definition: CombatLogPackets.h:333
float Unk
Definition: CombatLogPackets.h:364
int32 State12
Definition: CombatLogPackets.h:342
ByteBuffer & WriteLogData()
Definition: CombatLogPackets.h:73
float State10
Definition: CombatLogPackets.h:340
int32 BlockAmount
Definition: CombatLogPackets.h:361
void WriteLogDataBit()
Definition: CombatLogPackets.h:48
WorldPacket _worldPacket
Definition: Packet.h:43
ObjectGuid AttackerGUID
Definition: CombatLogPackets.h:353
bool WriteBit(uint32 bit)
Definition: ByteBuffer.h:170
int32 OverDamage
Definition: CombatLogPackets.h:356
Definition: Unit.h:372
int32 State1
Definition: CombatLogPackets.h:331
Definition: Unit.h:356
size_t size() const
Definition: ByteBuffer.h:587
Definition: Unit.h:362
WorldPacket _fullLogPacket
Definition: CombatLogPackets.h:75
int32 MeleeSpellID
Definition: CombatLogPackets.h:360
Definition: Unit.h:357
ObjectGuid VictimGUID
Definition: CombatLogPackets.h:354
void append(T value)
Definition: ByteBuffer.h:143
float State2
Definition: CombatLogPackets.h:332
void FlushBits()
Definition: CombatLogPackets.h:54
int32 RageGained
Definition: CombatLogPackets.h:362
UnkAttackerState UnkState
Definition: CombatLogPackets.h:363
uint8 VictimState
Definition: CombatLogPackets.h:358
int32 AttackerState
Definition: CombatLogPackets.h:359
uint32 HitInfo
Definition: CombatLogPackets.h:352
float State6
Definition: CombatLogPackets.h:336
float State11
Definition: CombatLogPackets.h:341
Definition: Unit.h:361
Definition: Unit.h:354
uint32_t uint32
Definition: g3dmath.h:168
float State4
Definition: CombatLogPackets.h:334
Definition: Unit.h:355
int32 Damage
Definition: CombatLogPackets.h:355
Definition: Unit.h:349
float State9
Definition: CombatLogPackets.h:339
float State8
Definition: CombatLogPackets.h:338
float State7
Definition: CombatLogPackets.h:337

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid WorldPackets::CombatLog::AttackerStateUpdate::AttackerGUID
int32 WorldPackets::CombatLog::AttackerStateUpdate::AttackerState = -1
int32 WorldPackets::CombatLog::AttackerStateUpdate::BlockAmount = 0
int32 WorldPackets::CombatLog::AttackerStateUpdate::Damage = 0
uint32 WorldPackets::CombatLog::AttackerStateUpdate::HitInfo = 0
int32 WorldPackets::CombatLog::AttackerStateUpdate::MeleeSpellID = 0
int32 WorldPackets::CombatLog::AttackerStateUpdate::OverDamage = -1
int32 WorldPackets::CombatLog::AttackerStateUpdate::RageGained = 0
Optional<SubDamage> WorldPackets::CombatLog::AttackerStateUpdate::SubDmg
float WorldPackets::CombatLog::AttackerStateUpdate::Unk = 0.0f
UnkAttackerState WorldPackets::CombatLog::AttackerStateUpdate::UnkState
ObjectGuid WorldPackets::CombatLog::AttackerStateUpdate::VictimGUID
uint8 WorldPackets::CombatLog::AttackerStateUpdate::VictimState = 0

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