aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_07_31_00_world_spell_script_names.sql4
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp59
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp32
3 files changed, 63 insertions, 32 deletions
diff --git a/sql/updates/world/2013_07_31_00_world_spell_script_names.sql b/sql/updates/world/2013_07_31_00_world_spell_script_names.sql
new file mode 100644
index 00000000000..27779d0da45
--- /dev/null
+++ b/sql/updates/world/2013_07_31_00_world_spell_script_names.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (50341,50344);
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(50341, 'spell_oculus_touch_the_nightmare'),
+(50344, 'spell_oculus_dream_funnel');
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index e5f8cce6c46..e6969d1f519 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -520,6 +520,63 @@ public:
}
};
+
+class spell_oculus_touch_the_nightmare : public SpellScriptLoader
+{
+ public:
+ spell_oculus_touch_the_nightmare() : SpellScriptLoader("spell_oculus_touch_the_nightmare") { }
+
+ class spell_oculus_touch_the_nightmare_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_oculus_touch_the_nightmare_SpellScript);
+
+ void HandleDamageCalc(SpellEffIndex /*effIndex*/)
+ {
+ SetHitDamage(int32(GetCaster()->CountPctFromMaxHealth(30)));
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_oculus_touch_the_nightmare_SpellScript::HandleDamageCalc, EFFECT_2, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_oculus_touch_the_nightmare_SpellScript();
+ }
+};
+
+class spell_oculus_dream_funnel: public SpellScriptLoader
+{
+ public:
+ spell_oculus_dream_funnel() : SpellScriptLoader("spell_oculus_dream_funnel") { }
+
+ class spell_oculus_dream_funnel_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_oculus_dream_funnel_AuraScript);
+
+ void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
+ {
+ if (Unit* caster = GetCaster())
+ amount = int32(caster->CountPctFromMaxHealth(5));
+
+ canBeRecalculated = false;
+ }
+
+ void Register()
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_oculus_dream_funnel_AuraScript();
+ }
+};
+
void AddSC_oculus()
{
new npc_verdisa_beglaristrasz_eternos();
@@ -527,4 +584,6 @@ void AddSC_oculus()
new npc_ruby_emerald_amber_drake();
new spell_gen_stop_time();
new spell_call_ruby_emerald_amber_drake();
+ new spell_oculus_touch_the_nightmare();
+ new spell_oculus_dream_funnel();
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 13a19ca5b23..2e6594714c9 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1296,36 +1296,6 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader
}
};
-class spell_gen_dream_funnel: public SpellScriptLoader
-{
- public:
- spell_gen_dream_funnel() : SpellScriptLoader("spell_gen_dream_funnel") { }
-
- class spell_gen_dream_funnel_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_gen_dream_funnel_AuraScript);
-
- void HandleEffectCalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
- {
- if (GetCaster())
- amount = GetCaster()->GetMaxHealth() * 0.05f;
-
- canBeRecalculated = false;
- }
-
- void Register() OVERRIDE
- {
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_gen_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE);
- }
- };
-
- AuraScript* GetAuraScript() const OVERRIDE
- {
- return new spell_gen_dream_funnel_AuraScript();
- }
-};
-
class spell_gen_ds_flush_knockback : public SpellScriptLoader
{
public:
@@ -3679,7 +3649,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_clone_weapon();
new spell_gen_clone_weapon_aura();
new spell_gen_count_pct_from_max_hp("spell_gen_default_count_pct_from_max_hp");
- new spell_gen_count_pct_from_max_hp("spell_gen_30pct_count_pct_from_max_hp", 30);
new spell_gen_count_pct_from_max_hp("spell_gen_50pct_count_pct_from_max_hp", 50);
new spell_gen_create_lance();
new spell_gen_creature_permanent_feign_death();
@@ -3689,7 +3658,6 @@ void AddSC_generic_spell_scripts()
new spell_gen_defend();
new spell_gen_despawn_self();
new spell_gen_divine_storm_cd_reset();
- new spell_gen_dream_funnel();
new spell_gen_ds_flush_knockback();
new spell_gen_dummy_trigger();
new spell_gen_dungeon_credit();