From 8c2b1bc79bf024315d0bcb79d58493377d8bf64f Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Tue, 17 Jun 2025 20:50:29 +0300 Subject: [PATCH] fix(Scripts/HoL): Ionar's Static Overload missing knockback (#22049) --- .../rev_1746345420196375200.sql | 9 ++++++ .../Ulduar/HallsOfLightning/boss_ionar.cpp | 29 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1746345420196375200.sql diff --git a/data/sql/updates/pending_db_world/rev_1746345420196375200.sql b/data/sql/updates/pending_db_world/rev_1746345420196375200.sql new file mode 100644 index 000000000..f472b5c34 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1746345420196375200.sql @@ -0,0 +1,9 @@ +-- HoL - Static Overload +DELETE FROM `spell_script_names` WHERE `spell_id` IN (52658,59795) AND `ScriptName`='spell_ionar_static_overload'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(52658, 'spell_ionar_static_overload'), +(59795, 'spell_ionar_static_overload'); + +DELETE FROM `spelldifficulty_dbc` WHERE `ID` = 53337; +INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`, `DifficultySpellID_3`, `DifficultySpellID_4`) VALUES +(53337, 53337, 59798, 0, 0); diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp index 0524fd43f..752ef36a3 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp @@ -18,6 +18,8 @@ #include "CreatureScript.h" #include "Player.h" #include "ScriptedCreature.h" +#include "SpellScript.h" +#include "SpellScriptLoader.h" #include "SpellInfo.h" #include "halls_of_lightning.h" @@ -27,6 +29,7 @@ enum IonarSpells SPELL_BALL_LIGHTNING_H = 59800, SPELL_STATIC_OVERLOAD_N = 52658, SPELL_STATIC_OVERLOAD_H = 59795, + SPELL_STATIC_OVERLOAD_KNOCK = 53337, SPELL_DISPERSE = 52770, SPELL_SUMMON_SPARK = 52746, @@ -272,8 +275,34 @@ public: }; }; +// 52658, 59795 - Static Overload +class spell_ionar_static_overload : public AuraScript +{ + PrepareAuraScript(spell_ionar_static_overload); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_STATIC_OVERLOAD_KNOCK }); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* target = GetTarget()) + target->CastSpell(target, SPELL_STATIC_OVERLOAD_KNOCK, true); + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_ionar_static_overload::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_boss_ionar() { new boss_ionar(); new npc_spark_of_ionar(); + RegisterSpellScript(spell_ionar_static_overload); }