aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrisjdc <trisjdc@gmail.com>2014-06-09 00:45:12 +0100
committerTrisjdc <trisjdc@gmail.com>2014-06-09 00:45:12 +0100
commit38e12321a5e359ef1f70f936ce38719638095374 (patch)
treec4c80911e176fb76bbb9eeea869ef29692cecd65 /src
parent551c565746c9be4340f8aa7a946082d0e23ab8db (diff)
parentc85710e148d75450baedf6632b9ca6fd40b4148e (diff)
Merge pull request #12069 from Trisjdc/cheat_death
Core/Spells: Fix Cheat Death formula
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 3a4be53b5a2..b5ea898dc00 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10297,9 +10297,10 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
case 2109:
if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
{
- if (GetTypeId() != TYPEID_PLAYER)
- continue;
- float mod = ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f);
+ // Patch 2.4.3: The resilience required to reach the 90% damage reduction cap
+ // is 22.5% critical strike damage reduction, or 444 resilience.
+ // To calculate for 90%, we multiply the 100% by 4 (22.5% * 4 = 90%)
+ float mod = -1.0f * GetMeleeCritDamageReduction(400);
AddPct(TakenTotalMod, std::max(mod, float((*i)->GetAmount())));
}
break;
@@ -11410,9 +11411,10 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
case 2109:
if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
{
- if (GetTypeId() != TYPEID_PLAYER)
- continue;
- float mod = ToPlayer()->GetRatingBonusValue(CR_CRIT_TAKEN_MELEE) * (-8.0f);
+ // Patch 2.4.3: The resilience required to reach the 90% damage reduction cap
+ // is 22.5% critical strike damage reduction, or 444 resilience.
+ // To calculate for 90%, we multiply the 100% by 4 (22.5% * 4 = 90%)
+ float mod = -1.0f * GetMeleeCritDamageReduction(400);
AddPct(TakenTotalMod, std::max(mod, float((*i)->GetAmount())));
}
break;