![]() |
TrinityCore
|
#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 |
|
private |
| DamageInfo::DamageInfo | ( | Unit * | attacker, |
| Unit * | victim, | ||
| uint32 | damage, | ||
| SpellInfo const * | spellInfo, | ||
| SpellSchoolMask | schoolMask, | ||
| DamageEffectType | damageType, | ||
| WeaponAttackType | attackType | ||
| ) |
|
explicit |
| DamageInfo::DamageInfo | ( | CalcDamageInfo const & | dmgInfo, |
| uint8 | damageIndex | ||
| ) |
Definition at line 130 of file Unit.cpp.
References CalcDamageInfo::HitInfo, HITINFO_FULL_ABSORB, HITINFO_FULL_RESIST, HITINFO_PARTIAL_ABSORB, CalcDamageInfo::HitOutCome, m_block, m_hitMask, MELEE_HIT_BLOCK, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_DODGE, MELEE_HIT_EVADE, MELEE_HIT_GLANCING, MELEE_HIT_MISS, MELEE_HIT_NORMAL, MELEE_HIT_PARRY, PROC_HIT_ABSORB, PROC_HIT_BLOCK, PROC_HIT_CRITICAL, PROC_HIT_DODGE, PROC_HIT_EVADE, PROC_HIT_FULL_BLOCK, PROC_HIT_FULL_RESIST, PROC_HIT_IMMUNE, PROC_HIT_MISS, PROC_HIT_NORMAL, PROC_HIT_PARRY, CalcDamageInfo::TargetState, VICTIMSTATE_BLOCKS, and VICTIMSTATE_IS_IMMUNE.
| DamageInfo::DamageInfo | ( | SpellNonMeleeDamage const & | spellNonMeleeDamage, |
| DamageEffectType | damageType, | ||
| WeaponAttackType | attackType, | ||
| uint32 | hitMask | ||
| ) |
Definition at line 183 of file Unit.cpp.
References SpellNonMeleeDamage::absorb, SpellNonMeleeDamage::blocked, m_hitMask, PROC_HIT_ABSORB, and PROC_HIT_BLOCK.
| void DamageInfo::AbsorbDamage | ( | uint32 | amount | ) |
Definition at line 200 of file Unit.cpp.
References GetDamage(), m_absorb, m_damage, m_hitMask, and PROC_HIT_ABSORB.
Referenced by spell_mage_fire_frost_ward::Absorb(), Unit::CalcAbsorbResist(), and spell_valanar_kinetic_bomb_absorb::OnAbsorb().
| void DamageInfo::BlockDamage | ( | uint32 | amount | ) |
Definition at line 220 of file Unit.cpp.
References GetDamage(), m_block, m_damage, m_hitMask, PROC_HIT_BLOCK, PROC_HIT_CRITICAL, PROC_HIT_FULL_BLOCK, and PROC_HIT_NORMAL.
|
inline |
Definition at line 479 of file Unit.h.
Referenced by Unit::AttackerStateUpdate(), Unit::CalculateSpellDamageTaken(), Spell::EffectEnvironmentalDMG(), Spell::EffectHealthLeech(), Player::EnvironmentalDamage(), misc_commandscript::HandleDamageCommand(), AuraEffect::HandlePeriodicDamageAurasTick(), and AuraEffect::HandlePeriodicHealthLeechAuraTick().
|
inline |
Definition at line 472 of file Unit.h.
Referenced by Unit::CalcAbsorbResist(), spell_yogg_saron_grim_reprisal::spell_yogg_saron_grim_reprisal_AuraScript::HandleProc(), spell_blood_queen_twilight_bloodbolt::HandleResistance(), spell_abomination_mutated_transformation::HandleResistance(), spell_illidari_council_reflective_shield::OnAbsorb(), spell_kaelthas_shock_barrier::OnAbsorb(), and spell_pri_power_word_shield_aura::ReflectDamage().
|
inline |
Definition at line 477 of file Unit.h.
Referenced by Aura::CalcProcChance(), Player::CastItemCombatSpell(), Player::CastItemCombatSpell(), spell_warr_deep_wounds_aura::OnProc(), and Unit::ProcSkillsAndAuras().
|
inline |
Definition at line 481 of file Unit.h.
Referenced by Unit::AttackerStateUpdate().
|
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().
|
inline |
Definition at line 476 of file Unit.h.
Referenced by spell_dk_spell_deflection::Absorb(), and Unit::CalcAbsorbResist().
| uint32 DamageInfo::GetHitMask | ( | ) | const |
Definition at line 233 of file Unit.cpp.
References m_hitMask.
Referenced by Unit::AttackerStateUpdate(), Player::CastItemCombatSpell(), AuraEffect::HandlePeriodicDamageAurasTick(), and AuraEffect::HandlePeriodicHealthLeechAuraTick().
|
inline |
Definition at line 480 of file Unit.h.
Referenced by Unit::AttackerStateUpdate(), Unit::CalculateSpellDamageTaken(), Spell::EffectEnvironmentalDMG(), Player::EnvironmentalDamage(), misc_commandscript::HandleDamageCommand(), AuraEffect::HandlePeriodicDamageAurasTick(), and AuraEffect::HandlePeriodicHealthLeechAuraTick().
|
inline |
Definition at line 475 of file Unit.h.
Referenced by Unit::CalcAbsorbResist(), spell_hun_roar_of_sacrifice::CheckProc(), ProcEventInfo::GetSchoolMask(), spell_dk_acclimation::HandleProc(), spell_mage_burnout::HandleProc(), spell_mage_master_of_elements::HandleProc(), and spell_warl_nether_protection::HandleProc().
|
inline |
Definition at line 474 of file Unit.h.
Referenced by spell_valkyr_essences::Absorb(), Unit::CalcAbsorbResist(), Player::CastItemCombatSpell(), spell_gen_adaptive_warding::CheckProc(), spell_gen_obsidian_armor::CheckProc(), spell_mage_burnout::CheckProc(), spell_mage_master_of_elements::CheckProc(), ProcEventInfo::GetSpellInfo(), spell_mage_burnout::HandleProc(), spell_mage_master_of_elements::HandleProc(), and spell_pri_power_word_shield_aura::ReflectDamage().
|
inline |
Definition at line 473 of file Unit.h.
Referenced by Unit::CalcAbsorbResist(), Player::CastItemCombatSpell(), Player::CastItemCombatSpell(), spell_blood_queen_twilight_bloodbolt::HandleResistance(), and spell_abomination_mutated_transformation::HandleResistance().
| void DamageInfo::ModifyDamage | ( | int32 | amount | ) |
Definition at line 194 of file Unit.cpp.
References GetDamage(), and m_damage.
Referenced by Unit::CalcAbsorbResist().
| void DamageInfo::ResistDamage | ( | uint32 | amount | ) |
Definition at line 208 of file Unit.cpp.
References GetDamage(), m_damage, m_hitMask, m_resist, PROC_HIT_CRITICAL, PROC_HIT_FULL_RESIST, and PROC_HIT_NORMAL.
Referenced by Unit::CalcAbsorbResist().
|
private |
Definition at line 453 of file Unit.h.
Referenced by AbsorbDamage().
|
private |
|
private |
Definition at line 455 of file Unit.h.
Referenced by BlockDamage(), and DamageInfo().
|
private |
Definition at line 448 of file Unit.h.
Referenced by AbsorbDamage(), BlockDamage(), ModifyDamage(), and ResistDamage().
|
private |
|
private |
Definition at line 456 of file Unit.h.
Referenced by AbsorbDamage(), BlockDamage(), DamageInfo(), DamageInfo(), GetHitMask(), and ResistDamage().
|
private |
Definition at line 454 of file Unit.h.
Referenced by ResistDamage().
|
private |