Merge pull request #7065 from Vincent-Michael/PainAndSuffering
Core/Spells: Fix Pain and Suffering reduces damage
This commit is contained in:
@@ -861,21 +861,6 @@ void AuraEffect::CalculateSpellMod()
|
||||
case SPELL_AURA_DUMMY:
|
||||
switch (GetSpellInfo()->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_PRIEST:
|
||||
// Pain and Suffering
|
||||
if (m_spellInfo->SpellIconID == 2874)
|
||||
{
|
||||
if (!m_spellmod)
|
||||
{
|
||||
m_spellmod = new SpellModifier(GetBase());
|
||||
m_spellmod->op = SPELLMOD_DOT;
|
||||
m_spellmod->type = SPELLMOD_PCT;
|
||||
m_spellmod->spellId = GetId();
|
||||
m_spellmod->mask[1] = 0x00002000;
|
||||
}
|
||||
m_spellmod->value = GetAmount();
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_DRUID:
|
||||
switch (GetId())
|
||||
{
|
||||
|
||||
@@ -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