mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[8458] Re-implement SPELL_AURA_MOD_TARGET_ARMOR_PCT in more porper way for weapon dependent cases.
(cherry picked from commit 7efab7fd38c3a753e967648ca8ef1f2cdfbac76c) Signed-off-by: VladimirMangos <vladimir@getmangos.com> With some fixes and rewrites.
This commit is contained in:
parent
57158e9185
commit
63e7c092f1
7 changed files with 61 additions and 8 deletions
|
|
@ -1569,12 +1569,9 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage)
|
|||
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura
|
||||
armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL);
|
||||
|
||||
// Apply Player CR_ARMOR_PENETRATION rating
|
||||
// Apply Player CR_ARMOR_PENETRATION rating and percent talents
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
armor *= 1.0f - ((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f;
|
||||
|
||||
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
|
||||
armor *= 1.0f - GetTotalAuraModifier(SPELL_AURA_MOD_TARGET_ARMOR_PCT) / 100.0f;
|
||||
armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
|
||||
|
||||
if (armor < 0.0f)
|
||||
armor = 0.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue