From 547c0eb3d21ea2cc6c3e3f3f33677444e2a4a245 Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 5 Jul 2024 20:02:53 +0200 Subject: [PATCH] Icecrown: Implement s57385 and s57412 --- sql/scriptdev2/spell.sql | 2 ++ .../scripts/northrend/icecrown.cpp | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index f7327497d29..4e632e8de20 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -893,6 +893,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (57082,'spell_crystal_spikes'), (57083,'spell_crystal_spikes'), (57283,'spell_remove_mushroom_power'), +(57385,'spell_argent_cannon'), +(57412,'spell_reckoning_bomb'), (57418,'spell_to_icecrown_air_ship_h_summon_vehicle'), (57473,'spell_arcane_storm'), (57491,'spell_flame_tsunami_damage'), diff --git a/src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp b/src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp index 2367680d226..d06a8de4726 100644 --- a/src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp +++ b/src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp @@ -1063,6 +1063,39 @@ struct FrozenSiegebolt : public SpellScript } }; +// 57385 - Argent Cannon +struct ArgentCannon : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + if (effIdx != EFFECT_INDEX_0) + return; + + uint32 damage = spell->GetDamage(); + Position pos = spell->m_targets.getDestination(); + SpellCastArgs args; + args.SetDestination(pos); + spell->GetCaster()->CastSpell(args, damage, TRIGGERED_OLD_TRIGGERED); + + spell->GetCaster()->CastSpell(nullptr, 57608, TRIGGERED_OLD_TRIGGERED); // Powering Up The Core + } +}; + +// 57412 - Reckoning Bomb +struct ReckoningBomb : public SpellScript +{ + void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override + { + if (effIdx != EFFECT_INDEX_0) + return; + + uint32 damage = spell->GetDamage(); + Position pos = spell->m_targets.getDestination(); + SpellCastArgs args; + args.SetDestination(pos); + spell->GetCaster()->CastSpell(args, damage, TRIGGERED_OLD_TRIGGERED); + } +}; void AddSC_icecrown() { @@ -1101,4 +1134,6 @@ void AddSC_icecrown() RegisterSpellScript("spell_to_icecrown_air_ship_a_summon_vehicle"); RegisterSpellScript("spell_to_icecrown_air_ship_h_summon_vehicle"); RegisterSpellScript("spell_frozen_siegebolt"); + RegisterSpellScript("spell_argent_cannon"); + RegisterSpellScript("spell_reckoning_bomb"); }