Scripts/Spells: Implement hunter talent Manhunter (#30851)

This commit is contained in:
Aqua Deus
2025-04-13 16:24:09 +02:00
committed by GitHub
parent 1f1180e5c6
commit c3302cd093
2 changed files with 37 additions and 0 deletions
@@ -0,0 +1,7 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=1217788;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(1217788, 'spell_hun_manhunter');
DELETE FROM `spell_proc` WHERE `SpellId` IN (1217788);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(1217788,0x00,9,0x00020000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x0,0x0,0x0,0,0,0,0); -- Manhunter
@@ -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);