mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Spells: Fix Pain and Suffering reduces damage
This commit is contained in:
@@ -463,20 +463,8 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
}
|
||||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
// Shadow Word: Death - deals damage equal to damage done to caster
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x2)
|
||||
{
|
||||
int32 back_damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE);
|
||||
back_damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, (uint32)back_damage, SPELL_DIRECT_DAMAGE);
|
||||
// Pain and Suffering reduces damage
|
||||
if (AuraEffect* aurEff = m_caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 2874, 0))
|
||||
AddPctN(back_damage, -aurEff->GetAmount());
|
||||
|
||||
if (back_damage < int32(unitTarget->GetHealth()))
|
||||
m_caster->CastCustomSpell(m_caster, 32409, &back_damage, 0, 0, true);
|
||||
}
|
||||
// Improved Mind Blast (Mind Blast in shadow form bonus)
|
||||
else if (m_caster->GetShapeshiftForm() == FORM_SHADOW && (m_spellInfo->SpellFamilyFlags[0] & 0x00002000))
|
||||
if (m_caster->GetShapeshiftForm() == FORM_SHADOW && (m_spellInfo->SpellFamilyFlags[0] & 0x00002000))
|
||||
{
|
||||
Unit::AuraEffectList const& ImprMindBlast = m_caster->GetAuraEffectsByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
||||
for (Unit::AuraEffectList::const_iterator i = ImprMindBlast.begin(); i != ImprMindBlast.end(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user