Scripts/Spells: Implement dh talent Cycle of Binding (#31482)

This commit is contained in:
Aqua Deus
2026-01-11 22:58:45 +01:00
committed by GitHub
parent 963e69902b
commit 716b668301
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_proc` WHERE `SpellId` IN (389718);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(389718,0x00,107,0x00000000,0x00000000,0x00000002,0x00000000,0x0,0x0,0x1,0x2,0x0,0x0,0x0,0,0,0,0); -- Cycle of Binding
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dh_cycle_of_binding';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(389718,'spell_dh_cycle_of_binding');

View File

@@ -189,6 +189,7 @@ enum DemonHunterSpells
SPELL_DH_SHATTERED_SOULS_MARKER = 221461,
SPELL_DH_SHEAR = 203782,
SPELL_DH_SHEAR_PASSIVE = 203783,
SPELL_DH_SIGIL_OF_CHAINS = 202138,
SPELL_DH_SIGIL_OF_CHAINS_GRIP = 208674,
SPELL_DH_SIGIL_OF_CHAINS_JUMP = 208674,
SPELL_DH_SIGIL_OF_CHAINS_SLOW = 204843,
@@ -200,7 +201,9 @@ enum DemonHunterSpells
SPELL_DH_SIGIL_OF_FLAME_ENERGIZE = 389787,
SPELL_DH_SIGIL_OF_FLAME_FLAME_CRASH = 228973,
SPELL_DH_SIGIL_OF_FLAME_VISUAL = 208710,
SPELL_DH_SIGIL_OF_MISERY = 207684,
SPELL_DH_SIGIL_OF_MISERY_AOE = 207685,
SPELL_DH_SIGIL_OF_SILENCE = 202137,
SPELL_DH_SIGIL_OF_SILENCE_AOE = 204490,
SPELL_DH_SIGIL_OF_SPITE = 390163,
SPELL_DH_SIGIL_OF_SPITE_AOE = 389860,
@@ -597,6 +600,31 @@ class spell_dh_critical_chaos : public AuraScript
}
};
// 389718 - Cycle of Binding
class spell_dh_cycle_of_binding : public AuraScript
{
static constexpr std::array<uint32, 5> SigilSpellsIds = { SPELL_DH_SIGIL_OF_CHAINS, SPELL_DH_SIGIL_OF_FLAME, SPELL_DH_SIGIL_OF_MISERY, SPELL_DH_SIGIL_OF_SILENCE, SPELL_DH_SIGIL_OF_SPITE };
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(SigilSpellsIds);
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
{
SpellHistory* history = GetTarget()->GetSpellHistory();
SpellHistory::Duration amount = Seconds(-aurEff->GetAmount());
for (uint32 spellId : SigilSpellsIds)
history->ModifyCooldown(spellId, amount);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_dh_cycle_of_binding::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// Called by 198013 - Eye Beam
class spell_dh_cycle_of_hatred : public SpellScript
{
@@ -2142,6 +2170,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_collective_anguish_eye_beam);
RegisterSpellScript(spell_dh_consume_soul_vengeance_lesser);
RegisterSpellScript(spell_dh_critical_chaos);
RegisterSpellScript(spell_dh_cycle_of_binding);
RegisterSpellScript(spell_dh_cycle_of_hatred);
RegisterSpellScript(spell_dh_cycle_of_hatred_remove_stacks);
RegisterSpellScript(spell_dh_cycle_of_hatred_talent);