mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement dh talent Cycle of Binding (#31482)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user