Skip to content

Commit 7a688c1

Browse files
authored
Scripts/Brewfest: Implement a couple more BOTM (TrinityCore#31111)
* Draenic Pale Ale * Autumnal Acorn Ale * Bartlett's Bitter Brew
1 parent c867a1a commit 7a688c1

File tree

2 files changed

+96
-3
lines changed

2 files changed

+96
-3
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--
2+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27958;
3+
4+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 27958 AND `source_type` = 0;
5+
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
6+
(27958,0,0,0,11,0,100,0,0,0,0,0,0,11,50186,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Parading Pink Elekk - On Spawn - Cast 'Parading Pink Elekk Life Aura'"),
7+
(27958,0,1,0,60,0,100,1,0,5000,0,0,0,11,36440,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Parading Pink Elekk - On Update - Cast 'Drunk Invisibility (Pink)' (No Repeat)"),
8+
(27958,0,2,0,11,0,100,0,0,0,0,0,0,29,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Parading Pink Elekk - On Spawn - Start Follow Owner");
9+
10+
DELETE FROM `spell_script_names` WHERE `spell_id` = 50186 AND `ScriptName` = 'spell_gen_despawn_aura';
11+
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
12+
(50186,'spell_gen_despawn_aura');
13+
14+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_brewfest_botm_pink_elekk';
15+
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
16+
(42264,'spell_brewfest_botm_pink_elekk');
17+
18+
-- This one is based only on comments
19+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 27867;
20+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 27867 AND `source_type` = 0;
21+
DELETE FROM `smart_scripts` WHERE `entryorguid` BETWEEN 2786700 AND 2786701 AND `source_type` = 9;
22+
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
23+
(27867,0,0,0,11,0,100,0,0,0,0,0,0,87,2786700,2786701,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Spawn - Run Random Script"),
24+
25+
(2786700,9,0,0,0,0,100,0,0,0,0,0,0,11,49757,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Script - Cast 'BOTM - Woodland Brew - Squirrel Love Aura'"),
26+
(2786700,9,1,0,0,0,100,0,0,0,0,0,0,29,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Script - Start Follow Owner"),
27+
(2786700,9,2,0,0,0,100,0,10000,10000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Script - Despawn"),
28+
29+
(2786701,9,0,0,0,0,100,0,2000,2000,0,0,0,11,49764,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Script - Cast 'BOTM - Woodland Brew - Squirrel Hate'"),
30+
(2786701,9,1,0,0,0,100,0,0,0,0,0,0,114,0,0,0,0,0,0,1,0,0,0,0,30,30,0,0,"Woodland Squirrel - On Script - Move Offset"),
31+
(2786701,9,2,0,0,0,100,0,5000,5000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Woodland Squirrel - On Script - Despawn");
32+
33+
--
34+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_brewfest_botm_nauseous';
35+
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
36+
(49869,'spell_brewfest_botm_nauseous');

src/server/scripts/Events/brewfest.cpp

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,14 @@ class spell_brewfest_mount_transformation : public SpellScript
432432
July [Stranglethorn Brew]
433433
spell_brewfest_botm_jungle_madness
434434
August [Draenic Pale Ale]
435-
NYI
435+
spell_brewfest_botm_pink_elekk
436436
September [Binary Brew]
437437
spell_brewfest_botm_teach_language
438438
October [Autumnal Acorn Ale]
439-
NYI
439+
Nothing to script here
440440
November [Bartlett's Bitter Brew]
441-
NYI
441+
spell_brewfest_botm_nauseous
442+
Incomplete
442443
December [Lord of Frost's Private Label]
443444
Nothing to script here
444445
*/
@@ -573,6 +574,34 @@ class spell_brewfest_botm_jungle_madness : public SpellScript
573574
}
574575
};
575576

577+
enum DraenicPaleAle
578+
{
579+
SPELL_BOTM_PINK_ELEKK = 49908
580+
};
581+
582+
// 42264 - Weak Alcohol
583+
class spell_brewfest_botm_pink_elekk : public SpellScript
584+
{
585+
PrepareSpellScript(spell_brewfest_botm_pink_elekk);
586+
587+
bool Validate(SpellInfo const* /*spellInfo*/) override
588+
{
589+
return ValidateSpellInfo({ SPELL_BOTM_PINK_ELEKK });
590+
}
591+
592+
void HandleAfterCast()
593+
{
594+
// TODO: Needs additional research, this spell is most likely used if drunk state is high enough.
595+
if (roll_chance_i(50))
596+
GetCaster()->CastSpell(GetCaster(), SPELL_BOTM_PINK_ELEKK);
597+
}
598+
599+
void Register() override
600+
{
601+
AfterCast += SpellCastFn(spell_brewfest_botm_pink_elekk::HandleAfterCast);
602+
}
603+
};
604+
576605
enum BinaryBrew
577606
{
578607
SPELL_LEARN_GNOMISH_BINARY = 50242,
@@ -601,6 +630,32 @@ class spell_brewfest_botm_teach_language : public SpellScript
601630
}
602631
};
603632

633+
enum BartlettsBitterBrew
634+
{
635+
SPELL_BOTM_VOMIT_BREW_VOMIT_VISUAL = 49867
636+
};
637+
638+
// 49869 - Nauseous
639+
class spell_brewfest_botm_nauseous : public AuraScript
640+
{
641+
PrepareAuraScript(spell_brewfest_botm_nauseous);
642+
643+
bool Validate(SpellInfo const* /*spellInfo*/) override
644+
{
645+
return ValidateSpellInfo({ SPELL_BOTM_VOMIT_BREW_VOMIT_VISUAL });
646+
}
647+
648+
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
649+
{
650+
GetTarget()->CastSpell(GetTarget(), SPELL_BOTM_VOMIT_BREW_VOMIT_VISUAL, true);
651+
}
652+
653+
void Register() override
654+
{
655+
AfterEffectRemove += AuraEffectRemoveFn(spell_brewfest_botm_nauseous::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
656+
}
657+
};
658+
604659
enum CreateEmptyBrewBottle
605660
{
606661
SPELL_BOTM_CREATE_EMPTY_BREW_BOTTLE = 51655
@@ -706,7 +761,9 @@ void AddSC_event_brewfest()
706761
RegisterSpellScript(spell_brewfest_botm_bloated);
707762
RegisterSpellScript(spell_brewfest_botm_internal_combustion);
708763
RegisterSpellScript(spell_brewfest_botm_jungle_madness);
764+
RegisterSpellScript(spell_brewfest_botm_pink_elekk);
709765
RegisterSpellScript(spell_brewfest_botm_teach_language);
766+
RegisterSpellScript(spell_brewfest_botm_nauseous);
710767
RegisterSpellScript(spell_brewfest_botm_weak_alcohol);
711768
RegisterSpellScript(spell_brewfest_botm_empty_bottle_throw_resolve);
712769
RegisterSpellScript(spell_brewfest_mole_machine_portal_schedule);

0 commit comments

Comments
 (0)