TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldPackets::Spells::SpellCastLogData Struct Reference

#include <SpellPackets.h>

Public Member Functions

void Initialize (Unit const *unit)
 

Public Attributes

int32 Health = 0
 
int32 AttackPower = 0
 
int32 SpellPower = 0
 
std::vector< SpellLogPowerDataPowerData
 

Member Function Documentation

void WorldPackets::Spells::SpellCastLogData::Initialize ( Unit const unit)
92 {
93  Health = unit->GetHealth();
94  AttackPower = unit->GetTotalAttackPowerValue(unit->getClass() == CLASS_HUNTER ? RANGED_ATTACK : BASE_ATTACK);
95  SpellPower = unit->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_SPELL);
96  PowerData.emplace_back(int32(unit->getPowerType()), unit->GetPower(unit->getPowerType()));
97 }
Definition: Unit.h:619
std::vector< SpellLogPowerData > PowerData
Definition: SpellPackets.h:179
Definition: SharedDefines.h:299
int32 AttackPower
Definition: SpellPackets.h:177
Definition: SharedDefines.h:169
int32_t int32
Definition: g3dmath.h:167
int32 SpellPower
Definition: SpellPackets.h:178
int32 Health
Definition: SpellPackets.h:176
Definition: Unit.h:617

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int32 WorldPackets::Spells::SpellCastLogData::AttackPower = 0
int32 WorldPackets::Spells::SpellCastLogData::Health = 0
std::vector<SpellLogPowerData> WorldPackets::Spells::SpellCastLogData::PowerData
int32 WorldPackets::Spells::SpellCastLogData::SpellPower = 0

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