From b52e0ccbad718eb0b2d84f4a247c60f7934e8eb6 Mon Sep 17 00:00:00 2001 From: offl <11556157+offl@users.noreply.github.com> Date: Fri, 10 Jun 2022 00:15:20 +0300 Subject: Scripts/Quest: Migrate few quest spell scripts to zone files (#28015) --- .../scripts/Kalimdor/zone_azuremyst_isle.cpp | 32 ++++++++++++++++++++++ .../scripts/Kalimdor/zone_dustwallow_marsh.cpp | 32 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) (limited to 'src/server/scripts/Kalimdor') diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 1e874a9644a..3913560d859 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -634,6 +634,37 @@ class spell_inoculate_nestlewood : public AuraScript } }; +/*###### +## Quest 9452: Red Snapper - Very Tasty! +######*/ + +enum RedSnapperVeryTasty +{ + SPELL_FISHED_UP_RED_SNAPPER = 29867, + SPELL_FISHED_UP_MURLOC = 29869 +}; + +// 29866 - Cast Fishing Net +class spell_azuremyst_isle_cast_fishing_net : public SpellScript +{ + PrepareSpellScript(spell_azuremyst_isle_cast_fishing_net); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_FISHED_UP_RED_SNAPPER, SPELL_FISHED_UP_MURLOC }); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), roll_chance_i(66) ? SPELL_FISHED_UP_RED_SNAPPER : SPELL_FISHED_UP_MURLOC); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_azuremyst_isle_cast_fishing_net::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_azuremyst_isle() { new npc_draenei_survivor(); @@ -642,4 +673,5 @@ void AddSC_azuremyst_isle() new npc_magwin(); new npc_geezle(); RegisterSpellScript(spell_inoculate_nestlewood); + RegisterSpellScript(spell_azuremyst_isle_cast_fishing_net); } diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp index 1039d4df2d8..1f4d9053f8f 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -110,9 +110,41 @@ class spell_energize_aoe : public SpellScript } }; +/*###### +## Quest 11140: Recover the Cargo! +######*/ + +enum RecoverTheCargo +{ + SPELL_SUMMON_LOCKBOX = 42288, + SPELL_SUMMON_BURROWER = 42289 +}; + +// 42287 - Salvage Wreckage +class spell_dustwallow_marsh_salvage_wreckage : public SpellScript +{ + PrepareSpellScript(spell_dustwallow_marsh_salvage_wreckage); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_LOCKBOX, SPELL_SUMMON_BURROWER }); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), roll_chance_i(50) ? SPELL_SUMMON_LOCKBOX : SPELL_SUMMON_BURROWER); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_dustwallow_marsh_salvage_wreckage::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_dustwallow_marsh() { RegisterSpellScript(spell_ooze_zap); RegisterSpellScript(spell_ooze_zap_channel_end); RegisterSpellScript(spell_energize_aoe); + RegisterSpellScript(spell_dustwallow_marsh_salvage_wreckage); } -- cgit v1.2.3