Core/Spells: Fix Improved Felhunter mana energize part.

Based on code by Karolis.Rudzevicius
Fixes issue #2125
Fixes issue #2109

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-20 00:35:11 +01:00
parent 85d69dc73d
commit baff745be1

View File

@@ -542,8 +542,19 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
else if (m_spellInfo->SpellFamilyFlags[1] & 0x400000)
{
if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->isPet())
{
// Get DoTs on target by owner (5% increase by dot)
damage += int32(CalculatePctN(unitTarget->GetDoTsByCaster(m_caster->GetOwnerGUID()), 5));
if (Player* owner = m_caster->GetOwner()->ToPlayer())
{
if (AuraEffect* aurEff = owner->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, 214, 0))
{
int32 bp0 = aurEff->GetId() == 54037 ? 4 : 8;
m_caster->CastCustomSpell(m_caster, 54425, &bp0, NULL, NULL, true);
}
}
}
}
break;
}