Scripts/Spells: Fixed Mag'har Orc racial Ancestral Call

Port From (https://github.com/TrinityCore/TrinityCore/commit/a6632147d6d1884a7224077f24c7e6e656c419b8)
This commit is contained in:
hondacrx
2022-09-02 13:15:52 -04:00
parent f3a0e0527e
commit f2f9ca1509
+30
View File
@@ -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<Unit>