Fixed Drain Soul increased damage for targets below 25% HP. Closes issue #394. Closes issue #748. Closes issue #938. Rejoice, new era of server-side spells has begun!

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-03-17 16:38:31 +01:00
parent 4fb7bf3664
commit e5cbe017f4
5 changed files with 33 additions and 21 deletions
+20
View File
@@ -1411,6 +1411,26 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
}
}
break;
case SPELLFAMILY_WARLOCK:
// Drain Soul - If the target is at or below 25% health, Drain Soul causes four times the normal damage
if (GetSpellProto()->SpellFamilyFlags[0] & 0x00004000)
{
if (!target)
break;
if (apply)
{
if (target != caster && target->GetHealth() <= target->GetMaxHealth() / 4)
caster->CastSpell(caster, 200000, true);
}
else
{
if (target != caster)
caster->RemoveAurasDueToSpell(GetId());
else
caster->RemoveAurasDueToSpell(200000);
}
}
break;
}
}