[8747] Implement player's pet resilience, also fix DoT case.

This commit is contained in:
VladimirMangos 2009-10-29 04:32:16 +03:00
parent 012fac90c8
commit 1b6176396e
7 changed files with 82 additions and 99 deletions

View file

@ -2486,8 +2486,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)
@ -2550,8 +2550,8 @@ void Spell::EffectPowerBurn(uint32 i)
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
uint32 power = damage;
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;