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)
 
Unit * GetAttacker () const
 
Unit * GetVictim () 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 443 of file Unit.h.

Constructor & Destructor Documentation

◆ DamageInfo() [1/5]

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

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

◆ DamageInfo() [3/5]

DamageInfo::DamageInfo ( CalcDamageInfo const &  dmgInfo)
explicit

Definition at line 126 of file Unit.cpp.

◆ DamageInfo() [4/5]

◆ DamageInfo() [5/5]

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

Member Function Documentation

◆ AbsorbDamage()

void DamageInfo::AbsorbDamage ( uint32  amount)

◆ BlockDamage()

void DamageInfo::BlockDamage ( uint32  amount)

◆ GetAbsorb()

◆ GetAttacker()

◆ GetAttackType()

◆ GetBlock()

uint32 DamageInfo::GetBlock ( ) const
inline

Definition at line 481 of file Unit.h.

Referenced by Unit::AttackerStateUpdate().

◆ GetDamage()

uint32 DamageInfo::GetDamage ( ) const
inline

Definition at line 478 of file Unit.h.

Referenced by spell_dk_anti_magic_shell_raid::Absorb(), spell_dk_anti_magic_shell_self::Absorb(), spell_dk_anti_magic_zone::Absorb(), spell_dk_spell_deflection::Absorb(), spell_dk_will_of_the_necropolis::Absorb(), spell_dru_moonkin_form_passive::Absorb(), spell_dru_primal_tenacity::Absorb(), spell_pri_guardian_spirit::Absorb(), spell_rog_cheat_death::Absorb(), spell_rog_nerves_of_steel::Absorb(), spell_sha_astral_shift::Absorb(), spell_illidari_council_balance_of_power::Absorb(), spell_mage_fire_frost_ward::Absorb(), spell_pal_ardent_defender::Absorb(), AbsorbDamage(), Unit::AttackerStateUpdate(), BlockDamage(), Unit::CalcAbsorbResist(), Unit::CalculateSpellDamageTaken(), spell_pri_lightwell_renew::CheckDropCharge(), AuraEffect::CheckEffectProc(), spell_dk_necrosis::CheckProc(), spell_dk_unholy_blight::CheckProc(), spell_dk_wandering_plague::CheckProc(), spell_gen_proc_below_pct_damaged::CheckProc(), spell_item_necrotic_touch::CheckProc(), spell_mage_ignite::CheckProc(), spell_pal_eye_for_an_eye::CheckProc(), spell_pal_righteous_vengeance::CheckProc(), spell_pri_shadowfiend_death::CheckProc(), spell_sha_nature_guardian::CheckProc(), spell_warl_fel_synergy::CheckProc(), spell_warl_siphon_life::CheckProc(), spell_warr_t3_prot_8p_bonus::CheckProc(), Spell::EffectEnvironmentalDMG(), Player::EnvironmentalDamage(), AuraEffect::HandleBreakableCCAuraProc(), misc_commandscript::HandleDamageCommand(), AuraEffect::HandlePeriodicDamageAurasTick(), AuraEffect::HandlePeriodicHealthLeechAuraTick(), spell_devourer_of_souls_mirrored_soul_proc::HandleProc(), spell_anetheron_vampiric_aura::HandleProc(), spell_deathwhisper_vampiric_might::HandleProc(), spell_the_lich_king_dark_hunger::HandleProc(), spell_oculus_temporal_rift::HandleProc(), spell_yogg_saron_grim_reprisal::spell_yogg_saron_grim_reprisal_AuraScript::HandleProc(), spell_doom_lord_kazzak_twisted_reflection::HandleProc(), spell_dk_blood_gorged::HandleProc(), spell_dk_necrosis::HandleProc(), spell_dk_unholy_blight::HandleProc(), spell_dk_wandering_plague::HandleProc(), spell_dru_t10_balance_4p_bonus::HandleProc(), spell_gen_vampiric_touch::HandleProc(), spell_hun_roar_of_sacrifice::HandleProc(), spell_item_frozen_shadoweave::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_item_pet_healing::HandleProc(), spell_mage_ignite::HandleProc(), spell_pal_righteous_vengeance::HandleProc(), spell_pri_blessed_recovery::HandleProc(), spell_pri_vampiric_embrace::HandleProc(), spell_sha_spirit_hunt::HandleProc(), spell_sha_t8_elemental_4p_bonus::HandleProc(), spell_sha_t9_elemental_4p_bonus::HandleProc(), spell_warl_seed_of_corruption_dummy::HandleProc(), spell_warl_seed_of_corruption_generic::HandleProc(), spell_warl_soul_leech::HandleProc(), spell_blood_queen_twilight_bloodbolt::HandleResistance(), spell_abomination_mutated_transformation::HandleResistance(), ModifyDamage(), spell_yogg_saron_hodirs_protective_gaze::spell_yogg_saron_hodirs_protective_gaze_AuraScript::OnAbsorb(), spell_valanar_kinetic_bomb_absorb::OnAbsorb(), spell_xt002_exposed_heart::OnProc(), spell_blood_queen_essence_of_the_blood_queen::OnProc(), spell_pal_eye_for_an_eye::OnProc(), spell_warl_fel_synergy::OnProc(), spell_warl_siphon_life::OnProc(), spell_reliquary_of_souls_aura_of_desire::OnProcSpell(), and ResistDamage().

◆ GetDamageType()

DamageEffectType DamageInfo::GetDamageType ( ) const
inline

Definition at line 476 of file Unit.h.

Referenced by spell_dk_spell_deflection::Absorb(), and Unit::CalcAbsorbResist().

◆ GetHitMask()

◆ GetResist()

◆ GetSchoolMask()

◆ GetSpellInfo()

◆ GetVictim()

◆ ModifyDamage()

void DamageInfo::ModifyDamage ( int32  amount)

Definition at line 194 of file Unit.cpp.

References GetDamage(), and m_damage.

Referenced by Unit::CalcAbsorbResist().

◆ ResistDamage()

void DamageInfo::ResistDamage ( uint32  amount)

Member Data Documentation

◆ m_absorb

uint32 DamageInfo::m_absorb
private

Definition at line 453 of file Unit.h.

Referenced by AbsorbDamage().

◆ m_attacker

Unit* const DamageInfo::m_attacker
private

Definition at line 446 of file Unit.h.

◆ m_attackType

WeaponAttackType DamageInfo::m_attackType
private

Definition at line 452 of file Unit.h.

◆ m_block

uint32 DamageInfo::m_block
private

Definition at line 455 of file Unit.h.

Referenced by BlockDamage(), and DamageInfo().

◆ m_damage

uint32 DamageInfo::m_damage
private

Definition at line 448 of file Unit.h.

Referenced by AbsorbDamage(), BlockDamage(), ModifyDamage(), and ResistDamage().

◆ m_damageType

DamageEffectType const DamageInfo::m_damageType
private

Definition at line 451 of file Unit.h.

◆ m_hitMask

uint32 DamageInfo::m_hitMask
private

Definition at line 456 of file Unit.h.

Referenced by AbsorbDamage(), BlockDamage(), DamageInfo(), DamageInfo(), GetHitMask(), and ResistDamage().

◆ m_resist

uint32 DamageInfo::m_resist
private

Definition at line 454 of file Unit.h.

Referenced by ResistDamage().

◆ m_schoolMask

SpellSchoolMask const DamageInfo::m_schoolMask
private

Definition at line 450 of file Unit.h.

◆ m_spellInfo

SpellInfo const* const DamageInfo::m_spellInfo
private

Definition at line 449 of file Unit.h.

◆ m_victim

Unit* const DamageInfo::m_victim
private

Definition at line 447 of file Unit.h.


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