Core/Units: updated crit healing bonus calculation with patch 4.2.0 change
This commit is contained in:
1 parent
c288745598
commit
ca288aaab3
1 file changed
+2
-16
@@ -7202,22 +7202,8 @@ float Unit::SpellCritChanceTaken(Unit const* caster, SpellInfo const* spellInfo,
|
||||
|
||||
/*static*/ uint32 Unit::SpellCriticalHealingBonus(Unit const* caster, SpellInfo const* spellProto, uint32 damage)
|
||||
{
|
||||
// Calculate critical bonus
|
||||
int32 crit_bonus;
|
||||
switch (spellProto->DmgClass)
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_MELEE: // for melee based spells is 100%
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
/// @todo write here full calculation for melee/ranged spells
|
||||
crit_bonus = damage;
|
||||
break;
|
||||
default:
|
||||
crit_bonus = damage / 2; // for spells is 50%
|
||||
break;
|
||||
}
|
||||
|
||||
if (crit_bonus > 0)
|
||||
damage += crit_bonus;
|
||||
// As of Patch 4.2.0 (2011-06-28): all healing spells now crit for 200% instead of 150%
|
||||
damage *= 2;
|
||||
|
||||
if (caster)
|
||||
damage = int32(float(damage) * caster->GetTotalAuraMultiplier(SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT));
|
||||
|
||||
Reference in new issue
Block a user