Scripts/Items: BOTM Blackrock Lager & Springtime Stout & Metok's Bubble Bock & Binary Brew (#27891)

(cherry picked from commit c02b829788)
This commit is contained in:
offl
2022-03-29 00:47:38 +03:00
committed by Shauren
parent f9f65a8957
commit e526cad015
3 changed files with 131 additions and 35 deletions

View File

@@ -0,0 +1,26 @@
--
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 `serverside_spell` SET `ProcChance` = 101 WHERE `Id` = 61370;
DELETE FROM `serverside_spell_effect` WHERE `SpellID` = 61370;
INSERT INTO `serverside_spell_effect` (`SpellID`, `Effect`, `EffectAura`, `ImplicitTarget1`) VALUES
(61370, 6, 26, 1);
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';

View File

@@ -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);
}

View File

@@ -3092,40 +3092,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,
@@ -4499,7 +4465,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);