Implement player's pet resilience, also fix DoT case. by VladimirMangos and thx tali

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-19 18:46:51 +01:00
parent 5f0c623f8a
commit 1d79bc51ea
6 changed files with 81 additions and 93 deletions

View File

@@ -2646,8 +2646,8 @@ void Spell::EffectPowerDrain(uint32 i)
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
uint32 power = damage;
if ( drain_power == POWER_MANA && unitTarget->GetTypeId() == TYPEID_PLAYER )
power -= ((Player*)unitTarget)->GetSpellCritDamageReduction(power);
if (drain_power == POWER_MANA)
power -= unitTarget->GetSpellCritDamageReduction(power);
int32 new_damage;
if(curPower < power)
@@ -2712,8 +2712,8 @@ void Spell::EffectPowerBurn(uint32 i)
uint32 power = damage;
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
if ( powertype == POWER_MANA && unitTarget->GetTypeId() == TYPEID_PLAYER )
power -= ((Player*)unitTarget)->GetSpellCritDamageReduction(power);
if (powertype == POWER_MANA)
power -= unitTarget->GetSpellCritDamageReduction(power);
int32 new_damage = (curPower < power) ? curPower : power;