aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-09-07 18:31:19 -0500
committerSubv <s.v.h21@hotmail.com>2012-09-07 18:31:19 -0500
commit7121f015ed6561a4bc12cf08d8f9286b113e66ad (patch)
tree4e196af79d8ed272dca1caa87e3da1d94eb2e9ce
parent673ce30f38e983ac73fa916b8a6b1d71790c107c (diff)
Core/Scripts: Fixed a copy/paste mistake from previous commit
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 9b227737e0a..a48661d4aed 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -683,25 +683,25 @@ public:
class spell_warl_health_funnel_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warl_health_funnel_AuraScript)
+
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (Unit* target = GetTarget())
- {
- if (GetCaster()->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R2))
- target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2, true);
- else if (GetCaster()->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R1))
- target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1, true);
- }
-
+ Unit* caster = GetCaster();
+ if (!caster)
+ return;
+
+ Unit* target = GetTarget();
+ if (caster->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R2))
+ target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2, true);
+ else if (caster->HasAura(WARLOCK_IMPROVED_HEALTH_FUNNEL_R1))
+ target->CastSpell(target, WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1, true);
}
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- if (Unit* target = GetTarget())
- {
- target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1);
- target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2);
- }
+ Unit* target = GetTarget();
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1);
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2);
}
void Register()