aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-09-08 01:34:24 +0100
committerNay <dnpd.dd@gmail.com>2012-09-08 01:34:24 +0100
commit242a2fdbc19d42c51ce017e045d347619af3eb12 (patch)
tree16f9720d1d299c32d75d5e6e3beb18044e48dbb9 /src/server/scripts
parenteda5c3a9bfae1c9759a5cc00a2bdbd6bae184fab (diff)
parent4cf1e7309ff07b99a7c906a9069a436f925c01a3 (diff)
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/SkillHandler.cpp
Diffstat (limited to 'src/server/scripts')
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp4
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp47
2 files changed, 51 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 10f7150351e..ea51f07dbe3 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -329,6 +329,8 @@ public:
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
+
+ void UpdateAI(uint32 const diff) {}
};
};
@@ -438,6 +440,8 @@ public:
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
+
+ void UpdateAI(uint32 const diff) {}
};
};
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index e0131190916..a48661d4aed 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -41,6 +41,10 @@ enum WarlockSpells
WARLOCK_HAUNT_HEAL = 48210,
WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
+ WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
};
class spell_warl_banish : public SpellScriptLoader
@@ -671,6 +675,48 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
}
};
+class spell_warl_health_funnel : public SpellScriptLoader
+{
+public:
+ spell_warl_health_funnel() : SpellScriptLoader("spell_warl_health_funnel") { }
+
+ class spell_warl_health_funnel_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_warl_health_funnel_AuraScript)
+
+ void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ 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*/)
+ {
+ Unit* target = GetTarget();
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1);
+ target->RemoveAurasDueToSpell(WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2);
+ }
+
+ void Register()
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_warl_health_funnel_AuraScript::RemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
+ OnEffectApply += AuraEffectApplyFn(spell_warl_health_funnel_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_warl_health_funnel_AuraScript();
+ }
+};
+
void AddSC_warlock_spell_scripts()
{
new spell_warl_banish();
@@ -686,4 +732,5 @@ void AddSC_warlock_spell_scripts()
new spell_warl_haunt();
new spell_warl_unstable_affliction();
new spell_warl_curse_of_doom();
+ new spell_warl_health_funnel();
}