hondacrx
2022-01-05 23:33:20 -05:00
parent b67e313e6b
commit 3a0522e188
2 changed files with 34 additions and 6 deletions
+24
View File
@@ -410,6 +410,10 @@ namespace Scripts.Spells.Items
public const uint WorldQuellerFocus = 90900;
public const uint BrutalKinship1 = 144671;
public const uint BrutalKinship2 = 145738;
// Eggnog
public const uint EggNogReindeer = 21936;
public const uint EggNogSnowman = 21980;
}
struct TextIds
@@ -3912,4 +3916,24 @@ namespace Scripts.Spells.Items
AfterCast.Add(new CastHandler(SecondaryEffect));
}
}
[Script] // 21149 - Egg Nog
class spell_item_eggnog : SpellScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.EggNogReindeer, SpellIds.EggNogSnowman);
}
void HandleScript(uint effIndex)
{
if (RandomHelper.randChance(40))
GetCaster().CastSpell(GetHitUnit(), RandomHelper.randChance(50) ? SpellIds.EggNogReindeer : SpellIds.EggNogSnowman, GetCastItem());
}
public override void Register()
{
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 2, SpellEffectName.Inebriate));
}
}
}
@@ -0,0 +1,4 @@
--
DELETE FROM `spell_script_names` WHERE `ScriptName`="spell_item_eggnog";
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(21149,'spell_item_eggnog');