aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2022-03-29 00:47:38 +0300
committerGitHub <noreply@github.com>2022-03-29 00:47:38 +0300
commitc02b829788cb274a68b125aee4dab35b9a56a2b8 (patch)
treeac57f8a7bf211c5630e1fe7db2838177e19034e1
parentcedd95f9850d2c6d25d7dfda59d3e16e97a26b40 (diff)
Scripts/Items: BOTM Blackrock Lager & Springtime Stout & Metok's Bubble Bock & Binary Brew (#27891)
-rw-r--r--sql/updates/world/3.3.5/2022_03_28_00_world.sql23
-rw-r--r--src/server/scripts/Events/brewfest.cpp105
-rw-r--r--src/server/scripts/Spells/spell_item.cpp35
3 files changed, 128 insertions, 35 deletions
diff --git a/sql/updates/world/3.3.5/2022_03_28_00_world.sql b/sql/updates/world/3.3.5/2022_03_28_00_world.sql
new file mode 100644
index 00000000000..b1813a0f834
--- /dev/null
+++ b/sql/updates/world/3.3.5/2022_03_28_00_world.sql
@@ -0,0 +1,23 @@
+--
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_brewfest_botm_internal_combustion');
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(49738,'spell_brewfest_botm_internal_combustion');
+
+--
+UPDATE `creature_template` SET `scale` = 1, `AIName` = 'SmartAI' WHERE `entry` = 27870;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 27870 AND `source_type` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 2787000 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
+(27870,0,0,0,11,0,100,0,0,0,0,0,0,80,2787000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Wild Flower - On Spawn - Run Script"),
+
+(2787000,9,0,0,0,0,100,0,3000,3000,0,0,0,11,49801,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Wild Flower - On Script - Cast 'BOTM - Flowery Brew - Grow'");
+
+--
+UPDATE `spell_dbc` SET `ProcChance` = 101, `Effect1` = 6, `EffectImplicitTargetA1` = 1, `EffectApplyAuraName1` = 26 WHERE `Id` = 61370;
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_brewfest_botm_bloated');
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(49822,'spell_brewfest_botm_bloated');
+
+--
+UPDATE `spell_script_names` SET `ScriptName` = 'spell_brewfest_botm_teach_language' WHERE `ScriptName` = 'spell_item_teach_language';
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);
}
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index a20432a54cb..23e210a58cc 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -3013,40 +3013,6 @@ class spell_item_nitro_boosts_backfire : public AuraScript
float lastZ = INVALID_HEIGHT;
};
-enum TeachLanguage
-{
- SPELL_LEARN_GNOMISH_BINARY = 50242,
- SPELL_LEARN_GOBLIN_BINARY = 50246,
-};
-
-class spell_item_teach_language : public SpellScript
-{
- PrepareSpellScript(spell_item_teach_language);
-
- bool Load() override
- {
- return GetCaster()->GetTypeId() == TYPEID_PLAYER;
- }
-
- bool Validate(SpellInfo const* /*spell*/) override
- {
- return ValidateSpellInfo({ SPELL_LEARN_GNOMISH_BINARY, SPELL_LEARN_GOBLIN_BINARY });
- }
-
- void HandleDummy(SpellEffIndex /* effIndex */)
- {
- Player* caster = GetCaster()->ToPlayer();
-
- if (roll_chance_i(34))
- caster->CastSpell(caster, caster->GetTeam() == ALLIANCE ? SPELL_LEARN_GNOMISH_BINARY : SPELL_LEARN_GOBLIN_BINARY, true);
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_item_teach_language::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
-};
-
enum RocketBoots
{
SPELL_ROCKET_BOOTS_PROC = 30452,
@@ -4258,7 +4224,6 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_impale_leviroth);
RegisterSpellScript(spell_item_nitro_boosts);
RegisterSpellScript(spell_item_nitro_boosts_backfire);
- RegisterSpellScript(spell_item_teach_language);
RegisterSpellScript(spell_item_rocket_boots);
RegisterSpellScript(spell_item_runic_healing_injector);
RegisterSpellScript(spell_item_pygmy_oil);