diff options
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)); |