mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
fix(Spell/Scripts): MOVE Drinking to spell scripts (#11105)
This commit is contained in:
committed by
GitHub
parent
ab4ee71762
commit
f7760b4ea0
@@ -3634,6 +3634,44 @@ class spell_item_wraith_scythe_drain_life : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum MirrensDrinkingHat
|
||||
{
|
||||
SPELL_LOCH_MODAN_LAGER = 29827,
|
||||
SPELL_STOUTHAMMER_LITE = 29828,
|
||||
SPELL_AERIE_PEAK_PALE_ALE = 29829
|
||||
};
|
||||
|
||||
// 29830 - Mirren's Drinking Hat
|
||||
class spell_item_mirrens_drinking_hat : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_item_mirrens_drinking_hat);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
uint32 spellId = 0;
|
||||
switch (urand(1, 6))
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
spellId = SPELL_LOCH_MODAN_LAGER; break;
|
||||
case 4:
|
||||
case 5:
|
||||
spellId = SPELL_STOUTHAMMER_LITE; break;
|
||||
case 6:
|
||||
spellId = SPELL_AERIE_PEAK_PALE_ALE; break;
|
||||
}
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
caster->CastSpell(caster, spellId);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_item_mirrens_drinking_hat::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -3746,4 +3784,5 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_linken_boomerang);
|
||||
RegisterSpellScript(spell_item_recall);
|
||||
RegisterSpellScript(spell_item_wraith_scythe_drain_life);
|
||||
RegisterSpellScript(spell_item_mirrens_drinking_hat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user