diff options
| author | n0n4m3 <none@none> | 2009-12-19 18:46:51 +0100 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2009-12-19 18:46:51 +0100 |
| commit | 1d79bc51ea857070c5f23782c84dca5892c9edb2 (patch) | |
| tree | 63d5c441e5517cff0403f38cab0cf282b7d8cbaf /src/game/SpellAuras.cpp | |
| parent | 5f0c623f8aaa7a2fc8b6b8a51f35c4370ece7b86 (diff) | |
Implement player's pet resilience, also fix DoT case. by VladimirMangos and thx tali
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 99b8876b6e8..0b2089da7e3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6056,9 +6056,9 @@ void AuraEffect::PeriodicTick() if (crit) pdamage = pCaster->SpellCriticalDamageBonus(m_spellProto, pdamage, m_target); - // Reduce dot damage from resilience for players. - if (m_target->GetTypeId() == TYPEID_PLAYER) - pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage); + // only from players + if (IS_PLAYER_GUID(GetCasterGUID())) + pdamage -= m_target->GetSpellDamageReduction(pdamage); pCaster->CalcAbsorbResist(m_target, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, m_spellProto); @@ -6330,8 +6330,8 @@ void AuraEffect::PeriodicTick() int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power); // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) - if (power == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER) - drain_amount -= ((Player*)m_target)->GetSpellCritDamageReduction(drain_amount); + if (power == POWER_MANA) + drain_amount -= m_target->GetSpellCritDamageReduction(drain_amount); m_target->ModifyPower(power, -drain_amount); @@ -6469,8 +6469,8 @@ void AuraEffect::PeriodicTick() return; // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) - if (powerType == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER) - pdamage -= ((Player*)m_target)->GetSpellCritDamageReduction(pdamage); + if (powerType == POWER_MANA) + pdamage -= m_target->GetSpellCritDamageReduction(pdamage); uint32 gain = uint32(-m_target->ModifyPower(powerType, -pdamage)); |
