diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-02-23 11:27:36 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-02-23 11:30:25 -0300 |
commit | 32e2207ab9863b9d79b994afd929730ca04bbce8 (patch) | |
tree | 2917f1a845633c5755615b42f99e6f1d074e8f88 | |
parent | e62f4002f6bd87461e0c10cb7087834351b61aff (diff) |
Core/Scripts: Victory Rush and Rune Strike proc correction
(d0f760420a671bc255c0d3ebec75e6837507a541 follow up)
Closes #19192
-rw-r--r-- | sql/updates/world/3.3.5/2017_02_23_01_world_335.sql | 6 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2017_02_23_01_world_335.sql b/sql/updates/world/3.3.5/2017_02_23_01_world_335.sql new file mode 100644 index 00000000000..89858856417 --- /dev/null +++ b/sql/updates/world/3.3.5/2017_02_23_01_world_335.sql @@ -0,0 +1,6 @@ +UPDATE `spell_proc` SET `AttributesMask`=(`AttributesMask` & ~0x10) WHERE `SpellId` IN (32216, 56817); + +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_gen_proc_charge_drop_only'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(32216, 'spell_gen_proc_charge_drop_only'), +(56817, 'spell_gen_proc_charge_drop_only'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index c39e91cff42..f03431dcc75 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2798,6 +2798,32 @@ class spell_gen_proc_below_pct_damaged : public SpellScriptLoader } }; +class spell_gen_proc_charge_drop_only : public SpellScriptLoader +{ + public: + spell_gen_proc_charge_drop_only() : SpellScriptLoader("spell_gen_proc_charge_drop_only") { } + + class spell_gen_proc_charge_drop_only_AuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_proc_charge_drop_only_AuraScript); + + void HandleChargeDrop(ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + } + + void Register() override + { + OnProc += AuraProcFn(spell_gen_proc_charge_drop_only_AuraScript::HandleChargeDrop); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_proc_charge_drop_only_AuraScript(); + } +}; + enum ParachuteSpells { SPELL_PARACHUTE = 45472, @@ -4488,6 +4514,7 @@ void AddSC_generic_spell_scripts() new spell_gen_proc_below_pct_damaged("spell_item_corpse_tongue_coin_heroic"); new spell_gen_proc_below_pct_damaged("spell_item_petrified_twilight_scale"); new spell_gen_proc_below_pct_damaged("spell_item_petrified_twilight_scale_heroic"); + new spell_gen_proc_charge_drop_only(); new spell_gen_parachute(); new spell_gen_pet_summoned(); new spell_gen_profession_research(); |