diff options
author | offl <11556157+offl@users.noreply.github.com> | 2022-03-31 23:36:58 +0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-06-10 14:34:11 +0200 |
commit | 54b16f0d167a0c5a37c91dd7140fe97597a66ac8 (patch) | |
tree | 4fdf526a8c3840ee7081c3a90ce588b6f4d0a045 | |
parent | cc8a39b42f858dbbec0abce560d82361d7102734 (diff) |
Scripts/Items: BOTM Wild Winter Pilsner & Izzard's Ever Flavor & Stranglethorn Brew (#27898)
(cherry picked from commit 2d9c9fd61762c2cb5638c7d6c1189a3c0252d761)
-rw-r--r-- | sql/updates/world/master/2022_06_10_06_world_2022_03_31_01_world.sql | 21 | ||||
-rw-r--r-- | src/server/scripts/Events/brewfest.cpp | 88 |
2 files changed, 109 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_06_10_06_world_2022_03_31_01_world.sql b/sql/updates/world/master/2022_06_10_06_world_2022_03_31_01_world.sql new file mode 100644 index 00000000000..2f08cf4f058 --- /dev/null +++ b/sql/updates/world/master/2022_06_10_06_world_2022_03_31_01_world.sql @@ -0,0 +1,21 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_brewfest_botm_the_beast_within','spell_brewfest_botm_gassy','spell_brewfest_botm_jungle_madness'); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(50098,'spell_brewfest_botm_the_beast_within'), +(49864,'spell_brewfest_botm_gassy'), +(49962,'spell_brewfest_botm_jungle_madness'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27908; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 27908 AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2790800,2790801) AND `source_type` = 9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(27908,0,0,0,11,0,100,0,0,0,0,0,0,80,2790800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Spawn - Run Script"), +(27908,0,1,0,34,0,100,0,8,1,0,0,0,80,2790801,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Reached Point 1 - Run Script"), + +(2790800,9,0,0,0,0,100,0,0,0,0,0,0,11,50008,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Cast 'BOTM - Jungle Brew - Jungle Invisibility Aura'"), +(2790800,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Set Orientation Summoner"), +(2790800,9,2,0,0,0,100,0,2000,2000,0,0,0,69,1,0,0,3,0,0,23,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Move To Summoner"), + +(2790801,9,0,0,0,0,100,0,1000,1000,0,0,0,11,49965,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Cast 'BOTM - Jungle Brew - Jungle Madness Scared'"), +(2790801,9,1,0,0,0,100,0,3000,3000,0,0,0,11,50048,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Cast 'BOTM - Jungle Brew - Jungle Gnome Vanish Aura'"), +(2790801,9,2,0,0,0,100,0,1000,1000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Angry Jungle Gnome - On Script - Despawn"); diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index d2e8b035ecb..b4698876f33 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -417,8 +417,11 @@ class spell_brewfest_mount_transformation : public SpellScript /* Brew of the Month January [Wild Winter Pilsner] + spell_brewfest_botm_the_beast_within February [Izzard's Ever Flavor] + spell_brewfest_botm_gassy March [Aromatic Honey Brew] + Nothing to script here April [Metok's Bubble Bock] spell_brewfest_botm_bloated Incomplete (spells 49828, 49827, 49830, 49837) @@ -427,15 +430,71 @@ class spell_brewfest_mount_transformation : public SpellScript June [Blackrock Lager] spell_brewfest_botm_internal_combustion July [Stranglethorn Brew] + spell_brewfest_botm_jungle_madness August [Draenic Pale Ale] + NYI September [Binary Brew] spell_brewfest_botm_teach_language October [Autumnal Acorn Ale] + NYI November [Bartlett's Bitter Brew] + NYI December [Lord of Frost's Private Label] Nothing to script here */ +enum WildWinterPilsner +{ + SPELL_BOTM_UNLEASH_THE_BEAST = 50099 +}; + +// 50098 - The Beast Within +class spell_brewfest_botm_the_beast_within : public AuraScript +{ + PrepareAuraScript(spell_brewfest_botm_the_beast_within); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_BOTM_UNLEASH_THE_BEAST }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->CastSpell(GetTarget(), SPELL_BOTM_UNLEASH_THE_BEAST); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_brewfest_botm_the_beast_within::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + +enum IzzardsEverFlavor +{ + SPELL_BOTM_BELCH_BREW_BELCH_VISUAL = 49860 +}; + +// 49864 - Gassy +class spell_brewfest_botm_gassy : public AuraScript +{ + PrepareAuraScript(spell_brewfest_botm_gassy); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_BOTM_BELCH_BREW_BELCH_VISUAL }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->CastSpell(GetTarget(), SPELL_BOTM_BELCH_BREW_BELCH_VISUAL, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_brewfest_botm_gassy::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + enum MetoksBubbleBock { SPELL_BOTM_BUBBLE_BREW_TRIGGER_MISSILE = 50072 @@ -488,6 +547,32 @@ class spell_brewfest_botm_internal_combustion : public AuraScript } }; +enum StranglethornBrew +{ + SPELL_BOTM_JUNGLE_BREW_VISION_EFFECT = 50010 +}; + +// 49962 - Jungle Madness! +class spell_brewfest_botm_jungle_madness : public SpellScript +{ + PrepareSpellScript(spell_brewfest_botm_jungle_madness); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_BOTM_JUNGLE_BREW_VISION_EFFECT }); + } + + void HandleAfterCast() + { + GetCaster()->CastSpell(GetCaster(), SPELL_BOTM_JUNGLE_BREW_VISION_EFFECT, true); + } + + void Register() override + { + AfterCast += SpellCastFn(spell_brewfest_botm_jungle_madness::HandleAfterCast); + } +}; + enum BinaryBrew { SPELL_LEARN_GNOMISH_BINARY = 50242, @@ -590,8 +675,11 @@ void AddSC_event_brewfest() RegisterSpellScript(spell_brewfest_dismount_ram); RegisterSpellScript(spell_brewfest_barker_bunny); RegisterSpellScript(spell_brewfest_mount_transformation); + RegisterSpellScript(spell_brewfest_botm_the_beast_within); + RegisterSpellScript(spell_brewfest_botm_gassy); RegisterSpellScript(spell_brewfest_botm_bloated); RegisterSpellScript(spell_brewfest_botm_internal_combustion); + RegisterSpellScript(spell_brewfest_botm_jungle_madness); RegisterSpellScript(spell_brewfest_botm_teach_language); RegisterSpellScript(spell_brewfest_botm_weak_alcohol); RegisterSpellScript(spell_brewfest_botm_empty_bottle_throw_resolve); |