diff options
author | offl <11556157+offl@users.noreply.github.com> | 2022-03-29 00:47:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 00:47:38 +0300 |
commit | c02b829788cb274a68b125aee4dab35b9a56a2b8 (patch) | |
tree | ac57f8a7bf211c5630e1fe7db2838177e19034e1 /src/server/scripts/Events/brewfest.cpp | |
parent | cedd95f9850d2c6d25d7dfda59d3e16e97a26b40 (diff) |
Scripts/Items: BOTM Blackrock Lager & Springtime Stout & Metok's Bubble Bock & Binary Brew (#27891)
Diffstat (limited to 'src/server/scripts/Events/brewfest.cpp')
-rw-r--r-- | src/server/scripts/Events/brewfest.cpp | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index 75335504ace..d2e8b035ecb 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -414,6 +414,108 @@ class spell_brewfest_mount_transformation : public SpellScript } }; +/* + Brew of the Month + January [Wild Winter Pilsner] + February [Izzard's Ever Flavor] + March [Aromatic Honey Brew] + April [Metok's Bubble Bock] + spell_brewfest_botm_bloated + Incomplete (spells 49828, 49827, 49830, 49837) + May [Springtime Stout] + Nothing to script here + June [Blackrock Lager] + spell_brewfest_botm_internal_combustion + July [Stranglethorn Brew] + August [Draenic Pale Ale] + September [Binary Brew] + spell_brewfest_botm_teach_language + October [Autumnal Acorn Ale] + November [Bartlett's Bitter Brew] + December [Lord of Frost's Private Label] + Nothing to script here +*/ + +enum MetoksBubbleBock +{ + SPELL_BOTM_BUBBLE_BREW_TRIGGER_MISSILE = 50072 +}; + +// 49822 - Bloated +class spell_brewfest_botm_bloated : public AuraScript +{ + PrepareAuraScript(spell_brewfest_botm_bloated); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_BOTM_BUBBLE_BREW_TRIGGER_MISSILE }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->CastSpell(GetTarget(), SPELL_BOTM_BUBBLE_BREW_TRIGGER_MISSILE, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_brewfest_botm_bloated::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + +enum BlackrockLager +{ + SPELL_BOTM_BELCH_FIRE_VISUAL = 49737 +}; + +// 49738 - Internal Combustion +class spell_brewfest_botm_internal_combustion : public AuraScript +{ + PrepareAuraScript(spell_brewfest_botm_internal_combustion); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_BOTM_BELCH_FIRE_VISUAL }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->CastSpell(GetTarget(), SPELL_BOTM_BELCH_FIRE_VISUAL, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_brewfest_botm_internal_combustion::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + +enum BinaryBrew +{ + SPELL_LEARN_GNOMISH_BINARY = 50242, + SPELL_LEARN_GOBLIN_BINARY = 50246 +}; + +// 50243 - Teach Language +class spell_brewfest_botm_teach_language : public SpellScript +{ + PrepareSpellScript(spell_brewfest_botm_teach_language); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_LEARN_GNOMISH_BINARY, SPELL_LEARN_GOBLIN_BINARY }); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Player* caster = GetCaster()->ToPlayer()) + caster->CastSpell(caster, caster->GetTeam() == ALLIANCE ? SPELL_LEARN_GNOMISH_BINARY : SPELL_LEARN_GOBLIN_BINARY, true); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_brewfest_botm_teach_language::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } +}; + enum CreateEmptyBrewBottle { SPELL_BOTM_CREATE_EMPTY_BREW_BOTTLE = 51655 @@ -488,6 +590,9 @@ void AddSC_event_brewfest() RegisterSpellScript(spell_brewfest_dismount_ram); RegisterSpellScript(spell_brewfest_barker_bunny); RegisterSpellScript(spell_brewfest_mount_transformation); + RegisterSpellScript(spell_brewfest_botm_bloated); + RegisterSpellScript(spell_brewfest_botm_internal_combustion); + RegisterSpellScript(spell_brewfest_botm_teach_language); RegisterSpellScript(spell_brewfest_botm_weak_alcohol); RegisterSpellScript(spell_brewfest_botm_empty_bottle_throw_resolve); } |