From a7f61ed86a647e48e267113c95b87a48d767442d Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 21 Mar 2026 12:37:02 -0300 Subject: [PATCH] fix(Core/Spells): Prevent Flexweave Underlay use on ground (#25158) Co-authored-by: Claude Opus 4.6 --- .../rev_flexweave_underlay_script.sql | 2 ++ src/server/scripts/Spells/spell_item.cpp | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_flexweave_underlay_script.sql diff --git a/data/sql/updates/pending_db_world/rev_flexweave_underlay_script.sql b/data/sql/updates/pending_db_world/rev_flexweave_underlay_script.sql new file mode 100644 index 000000000..03f85741e --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_flexweave_underlay_script.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` = 55002; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (55002, 'spell_item_flexweave_underlay'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index a94ee8382..4917351e8 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3565,6 +3565,24 @@ class spell_item_rocket_boots : public SpellScript } }; +// 55002 - Flexweave Underlay +class spell_item_flexweave_underlay : public SpellScript +{ + PrepareSpellScript(spell_item_flexweave_underlay); + + SpellCastResult CheckCast() + { + if (GetCaster()->IsFlying() || GetCaster()->IsFalling()) + return SPELL_CAST_OK; + return SPELL_FAILED_NOT_FLYING; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_item_flexweave_underlay::CheckCast); + } +}; + class spell_item_healing_injector : public SpellScript { PrepareSpellScript(spell_item_healing_injector); @@ -6327,6 +6345,7 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_deathbringers_will_normal); RegisterSpellScript(spell_item_deathbringers_will_heroic); RegisterSpellScript(spell_item_discerning_eye_beast_dummy); + RegisterSpellScript(spell_item_flexweave_underlay); RegisterSpellScript(spell_item_frozen_shadoweave); RegisterSpellScript(spell_item_healing_touch_refund); RegisterSpellScript(spell_item_heartpierce);