diff options
| -rw-r--r-- | sql/updates/world/2013_07_20_03_world_spell_script_misc_434.sql | 7 | ||||
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 11 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 44 |
3 files changed, 51 insertions, 11 deletions
diff --git a/sql/updates/world/2013_07_20_03_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_20_03_world_spell_script_misc_434.sql new file mode 100644 index 00000000000..9da7a7536cc --- /dev/null +++ b/sql/updates/world/2013_07_20_03_world_spell_script_misc_434.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=56372; +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(56372,'spell_mage_glyph_of_ice_block'); + +DELETE FROM `spell_proc_event` WHERE `entry`=56372; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(56372, 0, 3, 0, 0x80, 0x8, 0x4000, 0, 0, 100, 0); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 75668bc3b3a..957d2f5fd91 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5449,17 +5449,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); return true; } - // Glyph of Ice Block - case 56372: - { - Player* player = ToPlayer(); - if (!player) - return false; - - // Remove Frost Nova cooldown - player->RemoveSpellCooldown(122, true); - break; - } // Permafrost case 11175: case 12569: diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index fdd87f14610..91b5d154d4c 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -37,6 +37,7 @@ enum MageSpells SPELL_MAGE_BURNOUT = 29077, SPELL_MAGE_COLD_SNAP = 11958, SPELL_MAGE_FOCUS_MAGIC_PROC = 54648, + SPELL_MAGE_FROST_NOVA = 122, SPELL_MAGE_FROST_WARDING_R1 = 11189, SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776, SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394, @@ -646,6 +647,48 @@ class spell_mage_frostbolt : public SpellScriptLoader } }; +// 56372 - Glyph of Ice Block +class spell_mage_glyph_of_ice_block : public SpellScriptLoader +{ + public: + spell_mage_glyph_of_ice_block() : SpellScriptLoader("spell_mage_glyph_of_ice_block") { } + + class spell_mage_glyph_of_ice_block_AuraScript : public AuraScript + { + PrepareAuraScript(spell_mage_glyph_of_ice_block_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_NOVA)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + return GetTarget()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + // Remove Frost Nova cooldown + GetTarget()->ToPlayer()->RemoveSpellCooldown(SPELL_MAGE_FROST_NOVA, true); + } + + void Register() OVERRIDE + { + DoCheckProc += AuraCheckProcFn(spell_mage_glyph_of_ice_block_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_mage_glyph_of_ice_block_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_mage_glyph_of_ice_block_AuraScript(); + } +}; + // -44457 - Living Bomb class spell_mage_living_bomb : public SpellScriptLoader { @@ -1289,6 +1332,7 @@ void AddSC_mage_spell_scripts() new spell_mage_frostbolt(); new spell_mage_ice_barrier(); new spell_mage_ignite(); + new spell_mage_glyph_of_ice_block(); new spell_mage_living_bomb(); new spell_mage_mage_ward(); new spell_mage_mana_shield(); |
