aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2022-06-10 00:15:20 +0300
committerGitHub <noreply@github.com>2022-06-10 00:15:20 +0300
commitb52e0ccbad718eb0b2d84f4a247c60f7934e8eb6 (patch)
tree9f8b634d20449b3d8202515a9f0a90b1b0514d14 /src/server/scripts/Kalimdor
parentee9e4ac33e354f14f18efbbad8bf52e2e33e3003 (diff)
Scripts/Quest: Migrate few quest spell scripts to zone files (#28015)
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp32
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp32
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 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);
}