TrinityCore
Loading...
Searching...
No Matches
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 (CalcDamageInfo const &dmgInfo, uint8 damageIndex)
 
 DamageInfo (SpellNonMeleeDamage const &spellNonMeleeDamage, DamageEffectType damageType, WeaponAttackType attackType, uint32 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 GetAbsorb () const
 
uint32 GetResist () const
 
uint32 GetBlock () const
 
uint32 GetHitMask () const
 

Private Member Functions

 DamageInfo (DamageInfo const &dmg1, DamageInfo const &dmg2)
 

Private Attributes

Unit *const m_attacker
 
Unit *const m_victim
 
uint32 m_damage
 
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
 
uint32 m_hitMask
 

Detailed Description

Definition at line 429 of file Unit.h.

Constructor & Destructor Documentation

◆ DamageInfo() [1/5]

DamageInfo::DamageInfo ( DamageInfo const &  dmg1,
DamageInfo const &  dmg2 
)
private

Definition at line 119 of file Unit.cpp.

◆ DamageInfo() [2/5]

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

Definition at line 113 of file Unit.cpp.

◆ DamageInfo() [3/5]

DamageInfo::DamageInfo ( CalcDamageInfo const &  dmgInfo)
explicit

Definition at line 125 of file Unit.cpp.

◆ DamageInfo() [4/5]

DamageInfo::DamageInfo ( CalcDamageInfo const &  dmgInfo,
uint8  damageIndex 
)

Definition at line 129 of file Unit.cpp.

◆ DamageInfo() [5/5]

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

Definition at line 182 of file Unit.cpp.

Member Function Documentation

◆ AbsorbDamage()

void DamageInfo::AbsorbDamage ( uint32  amount)

Definition at line 199 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 219 of file Unit.cpp.

+ Here is the call graph for this function:

◆ GetAbsorb()

uint32 DamageInfo::GetAbsorb ( ) const
inline

Definition at line 465 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetAttacker()

Unit * DamageInfo::GetAttacker ( ) const
inline

Definition at line 458 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetAttackType()

WeaponAttackType DamageInfo::GetAttackType ( ) const
inline

Definition at line 463 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetBlock()

uint32 DamageInfo::GetBlock ( ) const
inline

Definition at line 467 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetDamage()

uint32 DamageInfo::GetDamage ( ) const
inline

Definition at line 464 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetDamageType()

DamageEffectType DamageInfo::GetDamageType ( ) const
inline

Definition at line 462 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetHitMask()

uint32 DamageInfo::GetHitMask ( ) const

Definition at line 232 of file Unit.cpp.

+ Here is the caller graph for this function:

◆ GetResist()

uint32 DamageInfo::GetResist ( ) const
inline

Definition at line 466 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetSchoolMask()

SpellSchoolMask DamageInfo::GetSchoolMask ( ) const
inline

Definition at line 461 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetSpellInfo()

SpellInfo const * DamageInfo::GetSpellInfo ( ) const
inline

Definition at line 460 of file Unit.h.

+ Here is the caller graph for this function:

◆ GetVictim()

Unit * DamageInfo::GetVictim ( ) const
inline

Definition at line 459 of file Unit.h.

+ Here is the caller graph for this function:

◆ ModifyDamage()

void DamageInfo::ModifyDamage ( int32  amount)

Definition at line 193 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 207 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 439 of file Unit.h.

◆ m_attacker

Unit* const DamageInfo::m_attacker
private

Definition at line 432 of file Unit.h.

◆ m_attackType

WeaponAttackType DamageInfo::m_attackType
private

Definition at line 438 of file Unit.h.

◆ m_block

uint32 DamageInfo::m_block
private

Definition at line 441 of file Unit.h.

◆ m_damage

uint32 DamageInfo::m_damage
private

Definition at line 434 of file Unit.h.

◆ m_damageType

DamageEffectType const DamageInfo::m_damageType
private

Definition at line 437 of file Unit.h.

◆ m_hitMask

uint32 DamageInfo::m_hitMask
private

Definition at line 442 of file Unit.h.

◆ m_resist

uint32 DamageInfo::m_resist
private

Definition at line 440 of file Unit.h.

◆ m_schoolMask

SpellSchoolMask const DamageInfo::m_schoolMask
private

Definition at line 436 of file Unit.h.

◆ m_spellInfo

SpellInfo const* const DamageInfo::m_spellInfo
private

Definition at line 435 of file Unit.h.

◆ m_victim

Unit* const DamageInfo::m_victim
private

Definition at line 433 of file Unit.h.


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