mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement hunter talent Lock and Load (#31258)
This commit is contained in:
@@ -629,6 +629,34 @@ class spell_hun_latent_poison_injectors_trigger : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 194595 - Lock and Load
|
||||
class spell_hun_lock_and_load : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_HUNTER_LOCK_AND_LOAD });
|
||||
}
|
||||
|
||||
static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/)
|
||||
{
|
||||
return roll_chance_i(aurEff->GetAmount());
|
||||
}
|
||||
|
||||
static void HandleProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
caster->CastSpell(caster, SPELL_HUNTER_LOCK_AND_LOAD, CastSpellExtraArgsInit{
|
||||
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
|
||||
});
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_hun_lock_and_load::CheckProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectProc += AuraEffectProcFn(spell_hun_lock_and_load::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 1217788 - Manhunter
|
||||
class spell_hun_manhunter : public AuraScript
|
||||
{
|
||||
@@ -1455,6 +1483,7 @@ void AddSC_hunter_spell_scripts()
|
||||
RegisterSpellScript(spell_hun_latent_poison_trigger);
|
||||
RegisterSpellScript(spell_hun_latent_poison_injectors_damage);
|
||||
RegisterSpellScript(spell_hun_latent_poison_injectors_trigger);
|
||||
RegisterSpellScript(spell_hun_lock_and_load);
|
||||
RegisterSpellScript(spell_hun_manhunter);
|
||||
RegisterSpellScript(spell_hun_master_marksman);
|
||||
RegisterSpellScript(spell_hun_masters_call);
|
||||
|
||||
Reference in New Issue
Block a user