From 9eeb4cc6a73d609d9db85966239b5ed8729c6dfd Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sun, 29 Mar 2020 01:07:13 +0100 Subject: [PATCH] Scripts/VP: Howling Gale will no now correctly apply its aurastate to players uppon hit to prevent multiple knockbacks in quick succession --- .../world/4.3.4/2020_03_29_00_world.sql | 4 ++++ .../VortexPinnacle/vortex_pinnacle.cpp | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 sql/updates/world/4.3.4/2020_03_29_00_world.sql diff --git a/sql/updates/world/4.3.4/2020_03_29_00_world.sql b/sql/updates/world/4.3.4/2020_03_29_00_world.sql new file mode 100644 index 00000000000..67bd2e7c2ed --- /dev/null +++ b/sql/updates/world/4.3.4/2020_03_29_00_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_vp_howling_gale_knockback'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(85159, 'spell_vp_howling_gale_knockback'), +(85085, 'spell_vp_howling_gale_knockback'); diff --git a/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp index 02af7e203cb..8dc0c288241 100644 --- a/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp +++ b/src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.cpp @@ -726,6 +726,28 @@ class spell_vp_howling_gale : public AuraScript } }; +// 85159, 85085 - Howling Gale +class spell_vp_howling_gale_knockback : public AuraScript +{ + PrepareAuraScript(spell_vp_howling_gale_knockback); + + void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + GetTarget()->ModifyAuraState(AURA_STATE_UNKNOWN22, true); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->ModifyAuraState(AURA_STATE_UNKNOWN22, false); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_vp_howling_gale_knockback::AfterApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_vp_howling_gale_knockback::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + // 84978, 84989, 85395, 85396, 85017 - Slipstream class spell_slipstream : public SpellScript { @@ -917,6 +939,7 @@ void AddSC_vortex_pinnacle() RegisterAuraScript(spell_lurk_ressurect); RegisterSpellScript(spell_lurk_search_victim); RegisterAuraScript(spell_vp_howling_gale); + RegisterAuraScript(spell_vp_howling_gale_knockback); RegisterSpellScript(spell_slipstream); RegisterSpellScript(spell_grounding_field); RegisterSpellScript(spell_skyfall);