aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_06_18_00_world_spell_script_names_434.sql4
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp47
2 files changed, 51 insertions, 0 deletions
diff --git a/sql/updates/world/2013_06_18_00_world_spell_script_names_434.sql b/sql/updates/world/2013_06_18_00_world_spell_script_names_434.sql
new file mode 100644
index 00000000000..7bb30c6b4b7
--- /dev/null
+++ b/sql/updates/world/2013_06_18_00_world_spell_script_names_434.sql
@@ -0,0 +1,4 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (86181,86209);
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(86181, 'spell_mage_nether_vortex'),
+(86209, 'spell_mage_nether_vortex');
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 5f3d17b0056..caa40235ca7 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -38,6 +38,7 @@ enum MageSpells
SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
SPELL_MAGE_IGNITE = 12654,
SPELL_MAGE_MASTER_OF_ELEMENTS_ENERGIZE = 29077,
+ SPELL_MAGE_SLOW = 31589,
SPELL_MAGE_SQUIRREL_FORM = 32813,
SPELL_MAGE_GIRAFFE_FORM = 32816,
SPELL_MAGE_SERPENT_FORM = 32817,
@@ -794,6 +795,51 @@ class spell_mage_master_of_elements : public SpellScriptLoader
}
};
+// 86181 - Nether Vortex
+class spell_mage_nether_vortex : public SpellScriptLoader
+{
+ public:
+ spell_mage_nether_vortex() : SpellScriptLoader("spell_mage_nether_vortex") { }
+
+ class spell_mage_nether_vortex_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mage_nether_vortex_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/)
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SLOW))
+ return false;
+ return true;
+ }
+
+ bool DoCheck(ProcEventInfo& eventInfo)
+ {
+ if (Aura* aura = eventInfo.GetProcTarget()->GetAura(SPELL_MAGE_SLOW))
+ if (aura->GetCasterGUID() != GetTarget()->GetGUID())
+ return false;
+
+ return true;
+ }
+
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_MAGE_SLOW, true, NULL, aurEff);
+ }
+
+ void Register()
+ {
+ DoCheckProc += AuraCheckProcFn(spell_mage_nether_vortex_AuraScript::DoCheck);
+ OnEffectProc += AuraEffectProcFn(spell_mage_nether_vortex_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const
+ {
+ return new spell_mage_nether_vortex_AuraScript();
+ }
+};
+
enum SilvermoonPolymorph
{
NPC_AUROSALIA = 18744
@@ -1157,6 +1203,7 @@ void AddSC_mage_spell_scripts()
new spell_mage_mage_ward();
new spell_mage_mana_shield();
new spell_mage_master_of_elements();
+ new spell_mage_nether_vortex();
new spell_mage_polymorph_cast_visual();
new spell_mage_replenish_mana();
new spell_mage_ring_of_frost();