aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2024_12_22_11_world.sql5
-rw-r--r--src/server/scripts/Spells/spell_dh.cpp27
2 files changed, 32 insertions, 0 deletions
diff --git a/sql/updates/world/master/2024_12_22_11_world.sql b/sql/updates/world/master/2024_12_22_11_world.sql
new file mode 100644
index 00000000000..3dd216fdc3e
--- /dev/null
+++ b/sql/updates/world/master/2024_12_22_11_world.sql
@@ -0,0 +1,5 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dh_cycle_of_hatred';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(188499, 'spell_dh_cycle_of_hatred'),
+(162794, 'spell_dh_cycle_of_hatred'),
+(342817, 'spell_dh_cycle_of_hatred');
diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp
index e9dc3f5c2c0..1eb811ec470 100644
--- a/src/server/scripts/Spells/spell_dh.cpp
+++ b/src/server/scripts/Spells/spell_dh.cpp
@@ -69,6 +69,7 @@ enum DemonHunterSpells
SPELL_DH_CONSUME_SOUL_VENGEANCE = 208014,
SPELL_DH_CONSUME_SOUL_VENGEANCE_DEMON = 210050,
SPELL_DH_CONSUME_SOUL_VENGEANCE_SHATTERED = 210047,
+ SPELL_DH_CYCLE_OF_HATRED = 258887,
SPELL_DH_DARKGLARE_BOON = 389708,
SPELL_DH_DARKGLARE_BOON_ENERGIZE = 391345,
SPELL_DH_DARKNESS_ABSORB = 209426,
@@ -350,6 +351,31 @@ class spell_dh_collective_anguish_eye_beam : public AuraScript
}
};
+// Called by 188499 - Blade Dance, 162794 - Chaos Strike and 342817 - Glaive Tempest
+class spell_dh_cycle_of_hatred : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DH_CYCLE_OF_HATRED });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_DH_CYCLE_OF_HATRED);
+ }
+
+ void ReduceEyeBeamCooldown() const
+ {
+ if (AuraEffect const* aurEff = GetCaster()->GetAuraEffect(SPELL_DH_CYCLE_OF_HATRED, EFFECT_0))
+ GetCaster()->GetSpellHistory()->ModifyCooldown(SPELL_DH_EYE_BEAM, Milliseconds(-aurEff->GetAmount()));
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_dh_cycle_of_hatred::ReduceEyeBeamCooldown);
+ }
+};
+
// Called by 212084 - Fel Devastation
class spell_dh_darkglare_boon : public AuraScript
{
@@ -967,6 +993,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_charred_warblades);
RegisterSpellScript(spell_dh_collective_anguish);
RegisterSpellScript(spell_dh_collective_anguish_eye_beam);
+ RegisterSpellScript(spell_dh_cycle_of_hatred);
RegisterSpellScript(spell_dh_darkglare_boon);
RegisterSpellScript(spell_dh_darkness);
RegisterSpellScript(spell_dh_eye_beam);