aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-05-05 12:53:55 +0200
committerGitHub <noreply@github.com>2025-05-05 12:53:55 +0200
commit753fc3c3e0022e8d1a5d1c576342c211bcec4dd7 (patch)
tree6da8a87b5a629ec6bdf4dde80f891e4f107072f3 /src
parente57f0d01fb00b8cf86e7dd75c6f754bed95568ad (diff)
Scripts/Spells: Implement hunter talent Scout's Instincts (#30841)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 0178b0402fb..a90d2b27e66 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -73,6 +73,7 @@ enum HunterSpells
SPELL_HUNTER_RAPID_FIRE = 257044,
SPELL_HUNTER_RAPID_FIRE_DAMAGE = 257045,
SPELL_HUNTER_RAPID_FIRE_ENERGIZE = 263585,
+ SPELL_HUNTER_SCOUTS_INSTINCTS = 459455,
SPELL_HUNTER_STEADY_SHOT = 56641,
SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443,
SPELL_HUNTER_T9_4P_GREATNESS = 68130,
@@ -804,6 +805,32 @@ class spell_hun_scatter_shot : public SpellScript
}
};
+// 459455 - Scout's Instincts (atatched to 186257 - Aspect of the Cheetah)
+class spell_hun_scouts_instincts : public SpellScript
+{
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ SPELL_HUNTER_SCOUTS_INSTINCTS })
+ && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
+ && spellInfo->GetEffect(EFFECT_1).IsAura(SPELL_AURA_MOD_MINIMUM_SPEED);
+ }
+
+ bool Load() override
+ {
+ return !GetCaster()->HasAura(SPELL_HUNTER_SCOUTS_INSTINCTS);
+ }
+
+ static void HandleMinSpeed(WorldObject*& target)
+ {
+ target = nullptr;
+ }
+
+ void Register() override
+ {
+ OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_hun_scouts_instincts::HandleMinSpeed, EFFECT_1, TARGET_UNIT_CASTER);
+ }
+};
+
// 459533 - Scrappy
class spell_hun_scrappy : public AuraScript
{
@@ -1123,6 +1150,7 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_rapid_fire_damage);
RegisterSpellScript(spell_hun_roar_of_sacrifice);
RegisterSpellScript(spell_hun_scatter_shot);
+ RegisterSpellScript(spell_hun_scouts_instincts);
RegisterSpellScript(spell_hun_scrappy);
RegisterSpellScript(spell_hun_steady_shot);
RegisterSpellScript(spell_hun_surging_shots);