aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/world_database.sql1
-rw-r--r--sql/updates/10099_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp34
3 files changed, 38 insertions, 0 deletions
diff --git a/sql/base/world_database.sql b/sql/base/world_database.sql
index 32b5367041f..1d9186da53a 100644
--- a/sql/base/world_database.sql
+++ b/sql/base/world_database.sql
@@ -26898,6 +26898,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 39610, 'spell_sha_mana_tide_totem'),
( -1535, 'spell_sha_fire_nova'),
-- mage
+(-11113, 'spell_mage_blast_wave'),
( 11958, 'spell_mage_cold_snap'),
( 31687, 'spell_mage_summon_water_elemental'),
( 32826, 'spell_mage_polymorph_visual'),
diff --git a/sql/updates/10099_world_spell_script_names.sql b/sql/updates/10099_world_spell_script_names.sql
new file mode 100644
index 00000000000..b25aa514f29
--- /dev/null
+++ b/sql/updates/10099_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (-11113) AND `ScriptName` = 'spell_mage_blast_wave';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(-11113,'spell_mage_blast_wave');
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 36504353bcb..24433669136 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -35,6 +35,7 @@ enum MageSpells
SPELL_MAGE_GLYPH_OF_ETERNAL_WATER = 70937,
SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT = 70908,
SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907,
+ SPELL_MAGE_GLYPH_OF_BLAST_WAVE = 62126,
};
class spell_mage_cold_snap : public SpellScriptLoader
@@ -172,9 +173,42 @@ class spell_mage_summon_water_elemental : public SpellScriptLoader
}
};
+class spell_mage_blast_wave : public SpellScriptLoader
+{
+ public:
+ spell_mage_blast_wave() : SpellScriptLoader("spell_mage_blast_wave") { }
+
+ class spell_mage_blast_wave_SpellScript : public SpellScript
+ {
+ bool Validate(SpellEntry const * /*spellEntry*/)
+ {
+ if (!sSpellStore.LookupEntry(SPELL_MAGE_GLYPH_OF_BLAST_WAVE))
+ return false;
+ return true;
+ }
+
+ void HandleKnockBack(SpellEffIndex effIndex)
+ {
+ if (GetCaster()->HasAura(SPELL_MAGE_GLYPH_OF_BLAST_WAVE))
+ PreventHitDefaultEffect(effIndex);
+ }
+
+ void Register()
+ {
+ OnEffect += SpellEffectFn(spell_mage_blast_wave_SpellScript::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK);
+ }
+ };
+
+ SpellScript * GetSpellScript() const
+ {
+ return new spell_mage_blast_wave_SpellScript();
+ }
+};
+
void AddSC_mage_spell_scripts()
{
new spell_mage_cold_snap;
new spell_mage_polymorph_cast_visual;
new spell_mage_summon_water_elemental;
+ new spell_mage_blast_wave;
}