TrinityCore
DamageInfo Class Reference

#include <Unit.h>

Public Member Functions

 DamageInfo (Unit *attacker, Unit *victim, uint32 damage, SpellInfo const *spellInfo, SpellSchoolMask schoolMask, DamageEffectType damageType, WeaponAttackType attackType)
 
 DamageInfo (CalcDamageInfo const &dmgInfo)
 
 DamageInfo (SpellNonMeleeDamage const &spellNonMeleeDamage, DamageEffectType damageType, WeaponAttackType attackType, ProcFlagsHit hitMask)
 
void ModifyDamage (int32 amount)
 
void AbsorbDamage (uint32 amount)
 
void ResistDamage (uint32 amount)
 
void BlockDamage (uint32 amount)
 
UnitGetAttacker () const
 
UnitGetVictim () const
 
SpellInfo const * GetSpellInfo () const
 
SpellSchoolMask GetSchoolMask () const
 
DamageEffectType GetDamageType () const
 
WeaponAttackType GetAttackType () const
 
uint32 GetDamage () const
 
uint32 GetOriginalDamage () const
 
uint32 GetAbsorb () const
 
uint32 GetResist () const
 
uint32 GetBlock () const
 
ProcFlagsHit GetHitMask () const
 

Private Attributes

Unit *const m_attacker
 
Unit *const m_victim
 
uint32 m_damage
 
uint32 const m_originalDamage
 
SpellInfo const *const m_spellInfo
 
SpellSchoolMask const m_schoolMask
 
DamageEffectType const m_damageType
 
WeaponAttackType m_attackType
 
uint32 m_absorb
 
uint32 m_resist
 
uint32 m_block
 
ProcFlagsHit m_hitMask
 

Detailed Description

Definition at line 415 of file Unit.h.

Constructor & Destructor Documentation

◆ DamageInfo() [1/3]

DamageInfo::DamageInfo ( Unit attacker,
Unit victim,
uint32  damage,
SpellInfo const *  spellInfo,
SpellSchoolMask  schoolMask,
DamageEffectType  damageType,
WeaponAttackType  attackType 
)

Definition at line 135 of file Unit.cpp.

◆ DamageInfo() [2/3]

DamageInfo::DamageInfo ( CalcDamageInfo const &  dmgInfo)
explicit

Definition at line 141 of file Unit.cpp.

◆ DamageInfo() [3/3]

DamageInfo::DamageInfo ( SpellNonMeleeDamage const &  spellNonMeleeDamage,
DamageEffectType  damageType,
WeaponAttackType  attackType,
ProcFlagsHit  hitMask 
)

Definition at line 194 of file Unit.cpp.

Member Function Documentation

◆ AbsorbDamage()

void DamageInfo::AbsorbDamage ( uint32  amount)

Definition at line 211 of file Unit.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BlockDamage()

void DamageInfo::BlockDamage ( uint32  amount)

Definition at line 231 of file Unit.cpp.

+ Here is the call graph for this function:

◆ GetAbsorb()

uint32 DamageInfo::GetAbsorb ( ) const
inline

Definition at line 448 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetAttacker()

Unit * DamageInfo::GetAttacker ( ) const
inline

Definition at line 440 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetAttackType()

WeaponAttackType DamageInfo::GetAttackType ( ) const
inline

Definition at line 445 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetBlock()

uint32 DamageInfo::GetBlock ( ) const
inline

Definition at line 450 of file Unit.h.

◆ GetDamage()

uint32 DamageInfo::GetDamage ( ) const
inline

Definition at line 446 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetDamageType()

DamageEffectType DamageInfo::GetDamageType ( ) const
inline

Definition at line 444 of file Unit.h.

◆ GetHitMask()

ProcFlagsHit DamageInfo::GetHitMask ( ) const

Definition at line 244 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ GetOriginalDamage()

uint32 DamageInfo::GetOriginalDamage ( ) const
inline

Definition at line 447 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetResist()

uint32 DamageInfo::GetResist ( ) const
inline

Definition at line 449 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetSchoolMask()

SpellSchoolMask DamageInfo::GetSchoolMask ( ) const
inline

Definition at line 443 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetSpellInfo()

SpellInfo const * DamageInfo::GetSpellInfo ( ) const
inline

Definition at line 442 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetVictim()

Unit * DamageInfo::GetVictim ( ) const
inline

Definition at line 441 of file Unit.h.

+ Here is the caller graph for this function:

◆ ModifyDamage()

void DamageInfo::ModifyDamage ( int32  amount)

Definition at line 205 of file Unit.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResistDamage()

void DamageInfo::ResistDamage ( uint32  amount)

Definition at line 219 of file Unit.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_absorb

uint32 DamageInfo::m_absorb
private

Definition at line 426 of file Unit.h.

◆ m_attacker

Unit* const DamageInfo::m_attacker
private

Definition at line 418 of file Unit.h.

◆ m_attackType

WeaponAttackType DamageInfo::m_attackType
private

Definition at line 425 of file Unit.h.

◆ m_block

uint32 DamageInfo::m_block
private

Definition at line 428 of file Unit.h.

◆ m_damage

uint32 DamageInfo::m_damage
private

Definition at line 420 of file Unit.h.

◆ m_damageType

DamageEffectType const DamageInfo::m_damageType
private

Definition at line 424 of file Unit.h.

◆ m_hitMask

ProcFlagsHit DamageInfo::m_hitMask
private

Definition at line 429 of file Unit.h.

◆ m_originalDamage

uint32 const DamageInfo::m_originalDamage
private

Definition at line 421 of file Unit.h.

◆ m_resist

uint32 DamageInfo::m_resist
private

Definition at line 427 of file Unit.h.

◆ m_schoolMask

SpellSchoolMask const DamageInfo::m_schoolMask
private

Definition at line 423 of file Unit.h.

◆ m_spellInfo

SpellInfo const* const DamageInfo::m_spellInfo
private

Definition at line 422 of file Unit.h.

◆ m_victim

Unit* const DamageInfo::m_victim
private

Definition at line 419 of file Unit.h.


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