diff options
author | Xanadu <none@none> | 2010-03-17 16:38:31 +0100 |
---|---|---|
committer | Xanadu <none@none> | 2010-03-17 16:38:31 +0100 |
commit | e5cbe017f402a8e0f6feccdad42a11ff5ce06361 (patch) | |
tree | 803692493038ab0b07f3a854b9560ef5af05dbea /src/game/SpellAuras.cpp | |
parent | 4fb7bf3664cfd036b7847bafeeaab5f939a50959 (diff) |
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
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 55512e51ce7..3754043c572 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -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; } } |