aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2022-06-17 00:16:52 +0300
committerGitHub <noreply@github.com>2022-06-17 00:16:52 +0300
commit61f32426ab534f8b19fc85bbbac1224ffc73a70c (patch)
tree083f208c5061ed9ab777e22b2bba88f0a32ae8bc /src
parent5221f56d8cb5f43c91e0f5d4ecb5bc5b98e3227d (diff)
Scripts/Quest: Rework 'Mending Fences' (12915) (#28034)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index f13957ec394..f2052873bf5 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -1240,6 +1240,38 @@ class spell_storm_peaks_unstable_explosive_detonation : public SpellScript
}
};
+/*######
+## Quest 12915: Mending Fences
+######*/
+
+enum MendingFences
+{
+ SPELL_SUMMON_EARTHEN = 55528
+};
+
+// 55512 - Call of Earth
+class spell_storm_peaks_call_of_earth : public SpellScript
+{
+ PrepareSpellScript(spell_storm_peaks_call_of_earth);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_EARTHEN });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ uint8 count = urand(2, 6);
+ for (uint8 i = 0; i < count; i++)
+ GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_EARTHEN, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_storm_peaks_call_of_earth::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_storm_peaks()
{
RegisterCreatureAI(npc_brunnhildar_prisoner);
@@ -1267,4 +1299,5 @@ void AddSC_storm_peaks()
RegisterSpellScript(spell_storm_peaks_bear_flank_fail);
RegisterSpellScript(spell_storm_peaks_mammoth_explosion_master);
RegisterSpellScript(spell_storm_peaks_unstable_explosive_detonation);
+ RegisterSpellScript(spell_storm_peaks_call_of_earth);
}