Spell/Script: Egg Nog
Port From (https://github.com/TrinityCore/TrinityCore/commit/2b27278516510bbe055f67bca9409fcf7bac40c7)
This commit is contained in:
@@ -410,6 +410,10 @@ namespace Scripts.Spells.Items
|
|||||||
public const uint WorldQuellerFocus = 90900;
|
public const uint WorldQuellerFocus = 90900;
|
||||||
public const uint BrutalKinship1 = 144671;
|
public const uint BrutalKinship1 = 144671;
|
||||||
public const uint BrutalKinship2 = 145738;
|
public const uint BrutalKinship2 = 145738;
|
||||||
|
|
||||||
|
// Eggnog
|
||||||
|
public const uint EggNogReindeer = 21936;
|
||||||
|
public const uint EggNogSnowman = 21980;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TextIds
|
struct TextIds
|
||||||
@@ -3912,4 +3916,24 @@ namespace Scripts.Spells.Items
|
|||||||
AfterCast.Add(new CastHandler(SecondaryEffect));
|
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');
|
||||||
Reference in New Issue
Block a user