Scripts/Spells: Implement hunter talent Lock and Load
Port From (https://github.com/TrinityCore/TrinityCore/commit/f5d16ebb2f75fb9cb1d829daf21945b5d650d55f)
This commit is contained in:
@@ -610,6 +610,35 @@ class spell_hun_latent_poison_injectors_trigger : SpellScript
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 194595 - Lock and Load
|
||||
class spell_hun_lock_and_load : AuraScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.LockAndLoad);
|
||||
}
|
||||
|
||||
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
{
|
||||
return RandomHelper.randChance(aurEff.GetAmount());
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
{
|
||||
Unit caster = eventInfo.GetActor();
|
||||
caster.CastSpell(caster, SpellIds.LockAndLoad, new CastSpellExtraArgs()
|
||||
{
|
||||
TriggerFlags = TriggerCastFlags.IgnoreCastInProgress | TriggerCastFlags.DontReportCastError
|
||||
});
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
DoCheckEffectProc.Add(new(CheckProc, 0, AuraType.Dummy));
|
||||
OnEffectProc.Add(new(HandleProc, 0, AuraType.Dummy));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 1217788 - Manhunter
|
||||
class spell_hun_manhunter : AuraScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user