aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWin32 <none@none>2010-01-04 15:53:19 +0200
committerWin32 <none@none>2010-01-04 15:53:19 +0200
commitc2791f7d0ecdadcd06c5833408fc5a87d8ed2139 (patch)
treec5065b14403cf59c57e2c8d992630f67e26e8906 /src
parente8ebeff6bf8eaef111eedb0edff44c7bc0d3107b (diff)
fix Pain and Suffering (reduces the damage you take from your own Shadow Word: Death)
and remove double dmg Shadow Word: Death --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 98a4eaf3bc6..b31a0490d02 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -531,7 +531,11 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
// Shadow Word: Death - deals damage equal to damage done to caster
if ((m_spellInfo->SpellFamilyFlags[1] & 0x2 ))
{
- int32 back_damage = int32(damage + m_caster->SpellDamageBonus(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE));
+ int32 back_damage = m_caster->SpellDamageBonus(unitTarget, m_spellInfo, (uint32)damage, SPELL_DIRECT_DAMAGE);
+ // Pain and Suffering reduces damage
+ if (AuraEffect * aurEff = m_caster->GetDummyAura(SPELLFAMILY_PRIEST, 2874, 0))
+ back_damage -= aurEff->GetAmount() * back_damage / 100;
+
if(back_damage < unitTarget->GetHealth())
m_caster->CastCustomSpell(m_caster, SPELL_SHADOW_WORD_DEATH_32409, &back_damage, 0, 0, true);
}