Scripts/Hunter: Implement Explosive Shot

Port From (https://github.com/TrinityCore/TrinityCore/commit/2a79be02fd60bf37bbef7702194a5379503970a1)
This commit is contained in:
hondacrx
2023-01-30 08:33:03 -05:00
parent efb691841d
commit 3e6588bc55
+23 -3
View File
@@ -20,6 +20,7 @@ namespace Scripts.Spells.Hunter
public const uint Exhilaration = 109304;
public const uint ExhilarationPet = 128594;
public const uint ExhilarationR2 = 231546;
public const uint ExplosiveShotDamage = 212680;
public const uint Lonewolf = 155228;
public const uint MastersCallTriggered = 62305;
public const uint Misdirection = 34477;
@@ -72,7 +73,7 @@ namespace Scripts.Spells.Hunter
OnEffectRemove.Add(new EffectApplyHandler(RemoveEffect, 0, AuraType.PeriodicDummy, AuraEffectHandleModes.Real));
}
}
[Script] // 186257 - Aspect of the Cheetah
class spell_hun_aspect_cheetah : AuraScript
{
@@ -104,7 +105,7 @@ namespace Scripts.Spells.Hunter
void HandleOnHit()
{
if (GetCaster().HasAura(SpellIds.ExhilarationR2) && !GetCaster().HasAura(SpellIds.Lonewolf))
GetCaster().CastSpell((Unit)null, SpellIds.ExhilarationPet, true);
GetCaster().CastSpell(null, SpellIds.ExhilarationPet, true);
}
public override void Register()
@@ -113,6 +114,25 @@ namespace Scripts.Spells.Hunter
}
}
[Script] // 212431 - Explosive Shot
class spell_hun_explosive_shot : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.ExplosiveShotDamage);
}
void HandlePeriodic(AuraEffect aurEff)
{
GetCaster()?.CastSpell(GetTarget(), SpellIds.ExplosiveShotDamage, true);
}
public override void Register()
{
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandlePeriodic, 0, AuraType.PeriodicDummy));
}
}
[Script] // 212658 - Hunting Party
class spell_hun_hunting_party : AuraScript
{
@@ -326,7 +346,7 @@ namespace Scripts.Spells.Hunter
AfterCast.Add(new CastHandler(HandleAfterCast));
}
}
[Script] // 53480 - Roar of Sacrifice
class spell_hun_roar_of_sacrifice : AuraScript
{