From f2f9ca1509ac2b7a0a14cfc3f0ecee1239e109c3 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 2 Sep 2022 13:15:52 -0400 Subject: [PATCH] Scripts/Spells: Fixed Mag'har Orc racial Ancestral Call Port From (https://github.com/TrinityCore/TrinityCore/commit/a6632147d6d1884a7224077f24c7e6e656c419b8) --- Source/Scripts/Spells/Generic.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Source/Scripts/Spells/Generic.cs b/Source/Scripts/Spells/Generic.cs index f6f5fb6cf..3b28842a5 100644 --- a/Source/Scripts/Spells/Generic.cs +++ b/Source/Scripts/Spells/Generic.cs @@ -318,6 +318,12 @@ namespace Scripts.Spells.Generic // DefenderOfAzerothData public const uint DeathGateTeleportStormwind = 316999; public const uint DeathGateTeleportOrgrimmar = 317000; + + // AncestralCallSpells + public const uint RictusOfTheLaughingSkull = 274739; + public const uint ZealOfTheBurningBlade = 274740; + public const uint FerocityOfTheFrostwolf = 274741; + public const uint MightOfTheBlackrock = 274742; } struct CreatureIds @@ -4732,6 +4738,30 @@ namespace Scripts.Spells.Generic OnEffectPeriodic.Add(new EffectPeriodicHandler(OnPeriodic, 0, AuraType.PeriodicDummy)); } } + + [Script] // 274738 - Ancestral Call (Mag'har Orc Racial) + class spell_gen_ancestral_call : SpellScript + { + public override bool Validate(SpellInfo spell) + { + return ValidateSpellInfo(SpellIds.RictusOfTheLaughingSkull, SpellIds.ZealOfTheBurningBlade, SpellIds.FerocityOfTheFrostwolf, SpellIds.MightOfTheBlackrock); + } + + static uint[] AncestralCallBuffs = { SpellIds.RictusOfTheLaughingSkull, SpellIds.ZealOfTheBurningBlade, SpellIds.FerocityOfTheFrostwolf, SpellIds.MightOfTheBlackrock }; + + void HandleOnCast() + { + Unit caster = GetCaster(); + uint spellId = AncestralCallBuffs.SelectRandom(); + + caster.CastSpell(caster, spellId, true); + } + + public override void Register() + { + OnCast.Add(new CastHandler(HandleOnCast)); + } + } // 40307 - Stasis Field class StasisFieldSearcher : ICheck