diff options
| author | offl <11556157+offl@users.noreply.github.com> | 2022-03-07 01:45:32 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-26 15:49:11 +0100 |
| commit | 04c7e91097fbd0ba94cb60fee86958fdf29db8e9 (patch) | |
| tree | 85bf54fd11a73c9518bf134ea7b0441e7569a054 /src/server/scripts/Northrend | |
| parent | b105dc4c8fcbcd381d8c0ad24636d1e948743504 (diff) | |
Scripts/Quest: Update 'What Do You Feed a Yeti, Anyway?' (#27851)
(cherry picked from commit fbfb8da7fc89d8a595ec70969a54732372dc39d0)
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/zone_icecrown.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index abb581be651..d3d79eb18c7 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -858,6 +858,48 @@ class spell_q14076_14092_pound_drum : public SpellScript } }; +/*###### +## Quest 14112 & 14145: What Do You Feed a Yeti, Anyway? +######*/ + +enum ChumTheWaterSummons +{ + SPELL_SUMMON_ANGRY_KVALDIR = 66737, + SPELL_SUMMON_NORTH_SEA_MAKO = 66738, + SPELL_SUMMON_NORTH_SEA_THRESHER = 66739, + SPELL_SUMMON_NORTH_SEA_BLUE_SHARK = 66740 +}; + +std::array<uint32, 4> const ChumTheWaterSummonSpells = +{ + SPELL_SUMMON_ANGRY_KVALDIR, + SPELL_SUMMON_NORTH_SEA_MAKO, + SPELL_SUMMON_NORTH_SEA_THRESHER, + SPELL_SUMMON_NORTH_SEA_BLUE_SHARK +}; + +// 66741 - Chum the Water +class spell_q14112_14145_chum_the_water : public SpellScript +{ + PrepareSpellScript(spell_q14112_14145_chum_the_water); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo(ChumTheWaterSummonSpells); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + caster->CastSpell(caster, Trinity::Containers::SelectRandomContainerElement(ChumTheWaterSummonSpells)); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_q14112_14145_chum_the_water::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_icecrown() { new npc_argent_valiant; @@ -868,4 +910,5 @@ void AddSC_icecrown() RegisterSpellScript(spell_the_ocular_on_death); RegisterSpellScript(spell_summon_tualiq_proxy); RegisterSpellScript(spell_q14076_14092_pound_drum); + RegisterSpellScript(spell_q14112_14145_chum_the_water); } |
