From 9ba155c08997483cdef3f46b355ab36167c1cb65 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Mon, 8 Sep 2025 21:15:45 -0700 Subject: [PATCH] fix(Scripts/Northrend): Scourge Plague Spreader summons ghouls mid-air (#22845) --- .../rev_1757369338961290855.sql | 3 +++ .../scripts/Northrend/zone_borean_tundra.cpp | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1757369338961290855.sql diff --git a/data/sql/updates/pending_db_world/rev_1757369338961290855.sql b/data/sql/updates/pending_db_world/rev_1757369338961290855.sql new file mode 100644 index 000000000..b13225d37 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1757369338961290855.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=45612; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (45612, 'spell_necropolis_beam'); diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 448f1aaca..88013c47c 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -2124,6 +2124,25 @@ public: } }; +// 45612 - Necropolis Beam +class spell_necropolis_beam: public SpellScript +{ + PrepareSpellScript(spell_necropolis_beam); + + void SetDest(SpellDestination& dest) + { + Unit* caster = GetCaster(); + float floorZ = caster->GetMapHeight(caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ()); + if (floorZ > INVALID_HEIGHT) + dest._position.m_positionZ = floorZ; + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_necropolis_beam::SetDest, EFFECT_0, TARGET_DEST_CASTER); + } +}; + void AddSC_borean_tundra() { RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura); @@ -2148,4 +2167,5 @@ void AddSC_borean_tundra() RegisterSpellScript(spell_q11719_bloodspore_ruination_45997); new npc_bloodmage_laurith(); RegisterCreatureAI(npc_jenny); + RegisterSpellScript(spell_necropolis_beam); }