diff options
author | Nevan <none@none> | 2009-08-08 17:20:48 +0200 |
---|---|---|
committer | Nevan <none@none> | 2009-08-08 17:20:48 +0200 |
commit | ea605726d6d2e54518ef8a5f6c6195edeabcc9ba (patch) | |
tree | c9a100324b1350daea65503e1bd4b50d3adebc81 /src/game/Unit.cpp | |
parent | 6b4772207fc4a6af1c9942d0057b9005aa38452e (diff) |
*Fix Unbreakable Armor Formula
*Fix Glyph of Unbreakable Armor
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 75c958229a2..33db2c2ffdd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2046,6 +2046,22 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe } case SPELLFAMILY_DEATHKNIGHT: { + // Unbreakable Armor + if (spellProto->Id == 51271) + { + Unit* caster = (*i)->GetCaster(); + if (!caster) + continue; + + uint32 absorbed = uint32( currentAbsorb * caster->GetArmor() * 0.01f ); + + // Glyph of Unbreakable Armor + if (AuraEffect *aurEff = caster->GetAuraEffect(58635, 0)) + absorbed += uint32( absorbed * aurEff->GetAmount() / 100 ); + + RemainingDamage -= absorbed; + continue; + } // Anti-Magic Shell (on self) if (spellProto->Id == 48707) { |