diff options
| author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-04-13 16:24:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-13 16:24:09 +0200 |
| commit | c3302cd093b57972d4a7a881929225c49e5f8909 (patch) | |
| tree | db18859e069cac5bf98247abdb37a8427b24579d /src | |
| parent | 1f1180e5c6e071286ed404e70e0bdf7b7e23c993 (diff) | |
Scripts/Spells: Implement hunter talent Manhunter (#30851)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 25e6376cc1b..b2cf5bdc06f 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -47,6 +47,7 @@ enum HunterSpells SPELL_HUNTER_EXHILARATION_PET = 128594, SPELL_HUNTER_EXHILARATION_R2 = 231546, SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE = 212680, + SPELL_HUNTER_GREVIOUS_INJURY = 1217789, SPELL_HUNTER_HIGH_EXPLOSIVE_TRAP = 236775, SPELL_HUNTER_HIGH_EXPLOSIVE_TRAP_DAMAGE = 236777, SPELL_HUNTER_LATENT_POISON_STACK = 378015, @@ -445,6 +446,34 @@ class spell_hun_latent_poison_injectors_trigger : public SpellScript } }; +// 1217788 - Manhunter +class spell_hun_manhunter : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_GREVIOUS_INJURY }); + } + + static bool CheckProc(ProcEventInfo const& eventInfo) + { + return eventInfo.GetProcTarget()->IsPlayer(); + } + + static void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo) + { + eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_HUNTER_GREVIOUS_INJURY, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringAura = aurEff + }); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_manhunter::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_manhunter::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + // 53271 - Masters Call class spell_hun_masters_call : public SpellScript { @@ -919,6 +948,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_manhunter); RegisterSpellScript(spell_hun_masters_call); RegisterSpellScript(spell_hun_misdirection); RegisterSpellScript(spell_hun_misdirection_proc); |
