mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement demon hunter talent "Cycle of hatred"
This commit is contained in:
5
sql/updates/world/master/2024_12_22_11_world.sql
Normal file
5
sql/updates/world/master/2024_12_22_11_world.sql
Normal file
@@ -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');
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user