diff options
| author | offl <11556157+offl@users.noreply.github.com> | 2022-06-10 00:15:20 +0300 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-06-10 19:32:05 +0200 |
| commit | 7d9d55ee87e87df86cdaf8b3d65330c6aa99e30e (patch) | |
| tree | 4551a507b6bd7ac0304b014216dc29e4c5a3fc1a /src/server/scripts/Kalimdor | |
| parent | fcc08ffb223602f19610bd87d25d32bdf34ca589 (diff) | |
Scripts/Quest: Migrate few quest spell scripts to zone files (#28015)
(cherry picked from commit b52e0ccbad718eb0b2d84f4a247c60f7934e8eb6)
Diffstat (limited to 'src/server/scripts/Kalimdor')
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp | 32 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp | 32 |
2 files changed, 64 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp index 5b241b476eb..18ddd8a2a38 100644 --- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp @@ -632,6 +632,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(); @@ -639,4 +670,5 @@ void AddSC_azuremyst_isle() new npc_injured_draenei(); new npc_magwin(); 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 5be9f6502cb..a73bc730ae3 100644 --- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp +++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp @@ -122,9 +122,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); } |
