diff options
author | offl <11556157+offl@users.noreply.github.com> | 2022-03-04 00:57:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 00:57:14 +0200 |
commit | 9d654345b50daff0a6b83db9a0c2aa05aac1bd64 (patch) | |
tree | ca441d672b9ab3cc24c74995f3fa5cb52575d039 /src | |
parent | 08f7fe67d1ec295bb4e3fb8fe9da02c656ae70c6 (diff) |
Scripts/Quest: Update 'Breakfast Of Champions' (#27846)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/zone_icecrown.cpp | 32 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 33 |
2 files changed, 32 insertions, 33 deletions
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 005a5cd24ae..9ee82d36ae5 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -829,6 +829,37 @@ class spell_summon_tualiq_proxy : public SpellScript } }; +/*###### +## Quest 14076 & 14092: Breakfast Of Champions +######*/ + +enum BreakfastOfChampions +{ + SPELL_SUMMON_DEEP_JORMUNGAR = 66510, + SPELL_STORMFORGED_MOLE_MACHINE = 66492 +}; + +// 66512 - Pound Drum +class spell_q14076_14092_pound_drum : public SpellScript +{ + PrepareSpellScript(spell_q14076_14092_pound_drum); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_DEEP_JORMUNGAR, SPELL_STORMFORGED_MOLE_MACHINE }); + } + + void HandleSummon() + { + GetCaster()->CastSpell(GetCaster(), roll_chance_i(50) ? SPELL_SUMMON_DEEP_JORMUNGAR : SPELL_STORMFORGED_MOLE_MACHINE, true); + } + + void Register() override + { + OnCast += SpellCastFn(spell_q14076_14092_pound_drum::HandleSummon); + } +}; + void AddSC_icecrown() { new npc_argent_valiant; @@ -838,4 +869,5 @@ void AddSC_icecrown() new npc_frostbrood_skytalon(); RegisterSpellScript(spell_the_ocular_on_death); RegisterSpellScript(spell_summon_tualiq_proxy); + RegisterSpellScript(spell_q14076_14092_pound_drum); } diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 71eeaeab518..2b85c37705d 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -866,38 +866,6 @@ class spell_q9452_cast_net : public SpellScript } }; -enum BreakfastOfChampions -{ - SPELL_SUMMON_DEEP_JORMUNGAR = 66510, - SPELL_STORMFORGED_MOLE_MACHINE = 66492 -}; - -// 66512 - Pound Drum -class spell_q14076_14092_pound_drum : public SpellScript -{ - PrepareSpellScript(spell_q14076_14092_pound_drum); - - bool Validate(SpellInfo const* /*spell*/) override - { - return ValidateSpellInfo({ SPELL_SUMMON_DEEP_JORMUNGAR, SPELL_STORMFORGED_MOLE_MACHINE }); - } - - void HandleSummon() - { - Unit* caster = GetCaster(); - - if (roll_chance_i(50)) - caster->CastSpell(caster, SPELL_SUMMON_DEEP_JORMUNGAR, true); - else - caster->CastSpell(caster, SPELL_STORMFORGED_MOLE_MACHINE, true); - } - - void Register() override - { - OnCast += SpellCastFn(spell_q14076_14092_pound_drum::HandleSummon); - } -}; - enum FocusOnTheBeach { SPELL_BUNNY_CREDIT_BEAM = 47390, @@ -2217,7 +2185,6 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q13280_13283_jump_jets); RegisterSpellScript(spell_q14112_14145_chum_the_water); RegisterSpellScript(spell_q9452_cast_net); - RegisterSpellScript(spell_q14076_14092_pound_drum); RegisterSpellScript(spell_q12066_bunny_kill_credit); RegisterSpellScript(spell_q12735_song_of_cleansing); RegisterSpellScript(spell_q12372_cast_from_gossip_trigger); |