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 (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)
 
Unit * GetAttacker () const
 
Unit * GetVictim () 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 435 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 136 of file Unit.cpp.

◆ DamageInfo() [2/3]

◆ DamageInfo() [3/3]

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

Member Function Documentation

◆ AbsorbDamage()

◆ BlockDamage()

void DamageInfo::BlockDamage ( uint32  amount)

◆ GetAbsorb()

◆ GetAttacker()

◆ GetAttackType()

WeaponAttackType DamageInfo::GetAttackType ( ) const
inline

◆ GetBlock()

uint32 DamageInfo::GetBlock ( ) const
inline

Definition at line 470 of file Unit.h.

◆ GetDamage()

uint32 DamageInfo::GetDamage ( ) const
inline

Definition at line 466 of file Unit.h.

Referenced by spell_pri_guardian_spirit::Absorb(), spell_illidari_council_balance_of_power::Absorb(), spell_dh_darkness::Absorb(), spell_monk_stagger::Absorb(), AbsorbDamage(), BlockDamage(), spell_pri_sanctuary_absorb::CalcAbsorbAmount(), Unit::CalcAbsorbResist(), Unit::CalculateMeleeDamage(), Unit::CalculateSpellDamageTaken(), AuraEffect::CheckEffectProc(), spell_item_highfathers_machination::CheckHealth(), spell_item_blessed_portents::CheckProc(), Scripts::EasternKingdoms::TwilightHighlands::JulakDoom::spell_julak_doom_dark_whisper::CheckProc(), spell_gen_proc_below_pct_damaged::CheckProc(), spell_item_necrotic_touch::CheckProc(), spell_mage_ignite::CheckProc(), spell_warr_t3_prot_8p_bonus::CheckProc(), spell_pri_angelic_bulwark::CheckProc(), spell_sha_earth_shield::CheckProc(), Unit::DealDamage(), Unit::DealMeleeDamage(), spell_pri_shadow_word_death::DetermineKillStatus(), spell_warr_execute_refund_rage::DetermineKillStatus(), Spell::EffectEnvironmentalDMG(), Player::EnvironmentalDamage(), spell_mage_cauterize_AuraScript::HandleAbsorb(), spell_warl_chaotic_energies::HandleAbsorb(), spell_gen_no_npc_damage_below_override::HandleAbsorb(), spell_pal_ardent_defender::HandleAbsorb(), spell_dh_charred_warblades::HandleAfterProc(), AuraEffect::HandleBreakableCCAuraProc(), misc_commandscript::HandleDamageCommand(), spell_dk_permafrost::HandleEffectProc(), spell_dru_moonless_night::HandleEffectProc(), spell_pri_vampiric_embrace::HandleEffectProc(), spell_sha_ancestral_guidance::HandleEffectProc(), spell_pri_searing_light::HandleEffectProc(), AuraEffect::HandlePeriodicDamageAurasTick(), spell_devourer_of_souls_mirrored_soul_proc::HandleProc(), spell_dk_dancing_rune_weapon::HandleProc(), spell_dk_death_strike_enabler::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_dru_t10_balance_4p_bonus::HandleProc(), spell_gen_vampiric_touch::HandleProc(), spell_hun_roar_of_sacrifice::HandleProc(), spell_item_alchemist_stone::HandleProc(), spell_item_frozen_shadoweave::HandleProc(), spell_item_necrotic_touch::HandleProc(), spell_item_pet_healing::HandleProc(), spell_mage_ignite::HandleProc(), spell_mage_touch_of_the_magi_aura::HandleProc(), spell_warl_seed_of_corruption_generic::HandleProc(), spell_warr_brutal_vitality::HandleProc(), spell_warr_trauma::HandleProc(), spell_pri_shadow_mend_periodic_damage::HandleProc(), spell_warl_seed_of_corruption_dummy_aura::HandleProc(), spell_dh_soul_fragments_damage_taken_tracker::HandleProc(), spell_anetheron_vampiric_aura::HandleProc(), spell_dru_astral_smolder::HandleProc(), spell_sha_t8_elemental_4p_bonus::HandleProc(), spell_sha_t9_elemental_4p_bonus::HandleProc(), spell_warl_siphon_life::HandleProc(), spell_dru_ursocs_fury::HandleProc(), spell_hun_master_marksman::HandleProc(), spell_warr_fueled_by_violence::HandleProc(), spell_dru_elunes_favored_proc::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_reliquary_of_souls_aura_of_desire::OnProcSpell(), ResistDamage(), spell_anduin_wrynn_progression_aura::Trigger(), and spell_pri_atonement::TriggerAtonementHealOnTargets().

◆ GetDamageType()

DamageEffectType DamageInfo::GetDamageType ( ) const
inline

Definition at line 464 of file Unit.h.

Referenced by Unit::CalcAbsorbResist().

◆ GetHitMask()

◆ GetOriginalDamage()

◆ GetResist()

◆ GetSchoolMask()

◆ GetSpellInfo()

◆ GetVictim()

◆ ModifyDamage()

void DamageInfo::ModifyDamage ( int32  amount)

Definition at line 206 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 446 of file Unit.h.

Referenced by AbsorbDamage().

◆ m_attacker

Unit* const DamageInfo::m_attacker
private

Definition at line 438 of file Unit.h.

◆ m_attackType

WeaponAttackType DamageInfo::m_attackType
private

Definition at line 445 of file Unit.h.

◆ m_block

uint32 DamageInfo::m_block
private

Definition at line 448 of file Unit.h.

Referenced by BlockDamage(), and DamageInfo().

◆ m_damage

uint32 DamageInfo::m_damage
private

Definition at line 440 of file Unit.h.

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

◆ m_damageType

DamageEffectType const DamageInfo::m_damageType
private

Definition at line 444 of file Unit.h.

◆ m_hitMask

ProcFlagsHit DamageInfo::m_hitMask
private

Definition at line 449 of file Unit.h.

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

◆ m_originalDamage

uint32 const DamageInfo::m_originalDamage
private

Definition at line 441 of file Unit.h.

◆ m_resist

uint32 DamageInfo::m_resist
private

Definition at line 447 of file Unit.h.

Referenced by ResistDamage().

◆ m_schoolMask

SpellSchoolMask const DamageInfo::m_schoolMask
private

Definition at line 443 of file Unit.h.

◆ m_spellInfo

SpellInfo const* const DamageInfo::m_spellInfo
private

Definition at line 442 of file Unit.h.

◆ m_victim

Unit* const DamageInfo::m_victim
private

Definition at line 439 of file Unit.h.


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