From 3a053c6cd348be5984edcf5c776d5becbca61047 Mon Sep 17 00:00:00 2001 From: John Holiver Date: Fri, 31 Dec 2010 02:23:29 -0200 Subject: Scripts/Trial of the Crusader: 1) Fix Leeching Swarm damage and create spell difficulty links to code. Closes issue #4909 . 2) Fix Valkyr's Touch. Closes issue #4553 . 3) Fix Permafrost aura difficulty check. 4) Reduce Slime Pool damage range. 5) Avoid Shaman Champion Heroism spam using 5 minutes (CD) as timer. 6) Fix many spell target selection to only select players (no more totens or pets). 7) Fix Anub'arak Spike being able to receibe the permafrost aura in order to cast spike fail, hopefully. --- src/server/scripts/Spells/spell_generic.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/server/scripts/Spells') diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 0f664c3d829..1d35ebf59d4 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -281,17 +281,17 @@ public: void HandleEffectPeriodic(AuraEffect const * aurEff) { - Unit* pTarget = GetTarget(); - if (Unit* pCaster = GetCaster()) - { - int32 lifeLeeched = pTarget->CountPctFromMaxHealth(aurEff->GetAmount()); - if (lifeLeeched < 250) - lifeLeeched = 250; - // Damage - pCaster->CastCustomSpell(pTarget, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false); - // Heal - pCaster->CastCustomSpell(pCaster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false); - } + if (Unit* pTarget = GetTarget()) + if (Unit* pCaster = GetCaster()) + { + int32 lifeLeeched = pTarget->CountPctFromCurHealth(aurEff->GetAmount()); + if (lifeLeeched < 250) + lifeLeeched = 250; + // Damage + pCaster->CastCustomSpell(pTarget, SPELL_LEECHING_SWARM_DMG, &lifeLeeched, 0, 0, false); + // Heal + pCaster->CastCustomSpell(pCaster, SPELL_LEECHING_SWARM_HEAL, &lifeLeeched, 0, 0, false); + } } void Register() -- cgit v1.2.3