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

#include <CombatLogPackets.h>

Classes

struct  SpellLogEffect
 

Public Member Functions

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

ObjectGuid Caster
 
int32 SpellID = 0
 
std::vector< SpellLogEffectEffects
 
- 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::SpellExecuteLog::SpellExecuteLog ( )
inline
128 : CombatLogServerPacket(SMSG_SPELL_EXECUTE_LOG, 16 + 4 + 4 + 1) { }
Definition: Opcodes.h:1535
CombatLogServerPacket(OpcodeServer opcode, size_t initialSize=200, ConnectionType connection=CONNECTION_TYPE_DEFAULT)
Definition: CombatLogPackets.h:32

Member Function Documentation

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

Implements WorldPackets::Packet.

57 {
58  *this << Caster;
59  *this << SpellID;
60  *this << uint32(Effects.size());
61 
62  for (SpellLogEffect const& effect : Effects)
63  {
64  *this << effect.Effect;
65 
66  *this << uint32(effect.PowerDrainTargets.size());
67  *this << uint32(effect.ExtraAttacksTargets.size());
68  *this << uint32(effect.DurabilityDamageTargets.size());
69  *this << uint32(effect.GenericVictimTargets.size());
70  *this << uint32(effect.TradeSkillTargets.size());
71  *this << uint32(effect.FeedPetTargets.size());
72 
73  for (SpellLogEffectPowerDrainParams const& powerDrainTarget : effect.PowerDrainTargets)
74  {
75  *this << powerDrainTarget.Victim;
76  *this << powerDrainTarget.Points;
77  *this << powerDrainTarget.PowerType;
78  *this << powerDrainTarget.Amplitude;
79  }
80 
81  for (SpellLogEffectExtraAttacksParams const& extraAttacksTarget : effect.ExtraAttacksTargets)
82  {
83  *this << extraAttacksTarget.Victim;
84  *this << extraAttacksTarget.NumAttacks;
85  }
86 
87  for (SpellLogEffectDurabilityDamageParams const& durabilityDamageTarget : effect.DurabilityDamageTargets)
88  {
89  *this << durabilityDamageTarget.Victim;
90  *this << durabilityDamageTarget.ItemID;
91  *this << durabilityDamageTarget.Amount;
92  }
93 
94  for (SpellLogEffectGenericVictimParams const& genericVictimTarget : effect.GenericVictimTargets)
95  *this << genericVictimTarget.Victim;
96 
97  for (SpellLogEffectTradeSkillItemParams const& tradeSkillTarget : effect.TradeSkillTargets)
98  *this << tradeSkillTarget.ItemID;
99 
100  for (SpellLogEffectFeedPetParams const& feedPetTarget : effect.FeedPetTargets)
101  *this << feedPetTarget.ItemID;
102  }
103 
104  WriteLogDataBit();
105  FlushBits();
106  WriteLogData();
107 
108  return &_worldPacket;
109 }
uint32 NumAttacks
Definition: Spell.h:145
Definition: Spell.h:160
float Amplitude
Definition: Spell.h:139
ObjectGuid Victim
Definition: Spell.h:136
ByteBuffer & WriteLogData()
Definition: CombatLogPackets.h:73
ObjectGuid Victim
Definition: Spell.h:144
int32 ItemID
Definition: Spell.h:167
void WriteLogDataBit()
Definition: CombatLogPackets.h:48
WorldPacket _worldPacket
Definition: Packet.h:43
int32 SpellID
Definition: CombatLogPackets.h:133
ObjectGuid Victim
Definition: Spell.h:150
Definition: Spell.h:155
uint32 PowerType
Definition: Spell.h:138
Definition: Spell.h:134
int32 ItemID
Definition: Spell.h:162
Definition: Spell.h:165
int32 Amount
Definition: Spell.h:152
int32 ItemID
Definition: Spell.h:151
Definition: Spell.h:142
void FlushBits()
Definition: CombatLogPackets.h:54
ObjectGuid Victim
Definition: Spell.h:157
ObjectGuid Caster
Definition: CombatLogPackets.h:132
std::vector< SpellLogEffect > Effects
Definition: CombatLogPackets.h:134
uint32_t uint32
Definition: g3dmath.h:168
uint32 Points
Definition: Spell.h:137

Member Data Documentation

ObjectGuid WorldPackets::CombatLog::SpellExecuteLog::Caster
std::vector<SpellLogEffect> WorldPackets::CombatLog::SpellExecuteLog::Effects
int32 WorldPackets::CombatLog::SpellExecuteLog::SpellID = 0

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