mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement hunter talent Lock and Load (#31258)
This commit is contained in:
7
sql/updates/world/master/2025_09_20_00_world.sql
Normal file
7
sql/updates/world/master/2025_09_20_00_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_lock_and_load';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(194595,'spell_hun_lock_and_load');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId` IN (194594);
|
||||
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||
(194594,0x00,9,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x4,0x0,0x0,0x0,0x8,0x0,0,0,0,0); -- Lock and Load
|
||||
@@ -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