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);