aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2024-12-30 20:40:28 +0100
committerGitHub <noreply@github.com>2024-12-30 20:40:28 +0100
commit58489c542e5a7236168b8cc250ad1f198a3e603b (patch)
tree7d2c70c4323f700305fb9ce19497bcf9b5412176 /src
parente999d9608abcda5fc3872a85a780c08accbe5dc8 (diff)
Scripts/Spells: Implement demon hunter talent "Restless Hunter" (#30484)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_dh.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp
index 62c129622c4..b929db487aa 100644
--- a/src/server/scripts/Spells/spell_dh.cpp
+++ b/src/server/scripts/Spells/spell_dh.cpp
@@ -154,6 +154,8 @@ enum DemonHunterSpells
SPELL_DH_RAIN_OF_CHAOS = 205628,
SPELL_DH_RAIN_OF_CHAOS_IMPACT = 232538,
SPELL_DH_RAZOR_SPIKES = 210003,
+ SPELL_DH_RESTLESS_HUNTER_TALENT = 390142,
+ SPELL_DH_RESTLESS_HUNTER_BUFF = 390212,
SPELL_DH_SEVER = 235964,
SPELL_DH_SHATTER_SOUL = 209980,
SPELL_DH_SHATTER_SOUL_1 = 209981,
@@ -964,6 +966,38 @@ class spell_dh_glide_timer : public AuraScript
}
};
+// Called by 162264 - Metamorphosis
+class spell_dh_restless_hunter : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DH_RESTLESS_HUNTER_TALENT, SPELL_DH_RESTLESS_HUNTER_BUFF, SPELL_DH_FEL_RUSH })
+ && sSpellCategoryStore.HasRecord(sSpellMgr->AssertSpellInfo(SPELL_DH_FEL_RUSH, DIFFICULTY_NONE)->ChargeCategoryId);
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_DH_RESTLESS_HUNTER_TALENT);
+ }
+
+ void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const
+ {
+ Unit* target = GetTarget();
+
+ target->CastSpell(target, SPELL_DH_RESTLESS_HUNTER_BUFF, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .TriggeringAura = aurEff
+ });
+
+ target->GetSpellHistory()->RestoreCharge(sSpellMgr->AssertSpellInfo(SPELL_DH_FEL_RUSH, GetCastDifficulty())->ChargeCategoryId);
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_dh_restless_hunter::OnRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
+};
+
// 388116 - Shattered Destiny
class spell_dh_shattered_destiny : public AuraScript
{
@@ -1191,6 +1225,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_felblade_cooldown_reset_proc);
RegisterSpellScript(spell_dh_furious_gaze);
RegisterSpellScript(spell_dh_last_resort);
+ RegisterSpellScript(spell_dh_restless_hunter);
RegisterSpellScript(spell_dh_shattered_destiny);
RegisterSpellScript(spell_dh_sigil_of_chains);
RegisterSpellScript(spell_dh_tactical_retreat);