aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-05-25 14:30:43 +0200
committerGitHub <noreply@github.com>2025-05-25 14:30:43 +0200
commitc9101337f6bc32bf6b21d72280aba4a4ac29453c (patch)
tree2506e8669442b34e5eec26be2c137814bd15081d /src
parent1c360b8e11a1fb5c165558704407bed3778f104e (diff)
Scripts/Spells: Implement rogue talent Shot in the dark (#30979)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 6838ded7646..c5055305595 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -84,6 +84,8 @@ enum RogueSpells
SPELL_ROGUE_SHADOW_FOCUS = 108209,
SPELL_ROGUE_SHADOW_FOCUS_EFFECT = 112942,
SPELL_ROGUE_SHIV_NATURE_DAMAGE = 319504,
+ SPELL_ROGUE_SHOT_IN_THE_DARK_TALENT = 257505,
+ SPELL_ROGUE_SHOT_IN_THE_DARK_BUFF = 257506,
SPELL_ROGUE_SLICE_AND_DICE = 315496,
SPELL_ROGUE_SPRINT = 2983,
SPELL_ROGUE_SOOTHING_DARKNESS_TALENT = 393970,
@@ -1046,6 +1048,53 @@ class spell_rog_shadow_focus : public AuraScript
}
};
+// 257505 - Shot in the Dark (attached to 1784 - Stealth and 185313 - Shadow Dance)
+class spell_rog_shot_in_the_dark : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ROGUE_SHOT_IN_THE_DARK_TALENT, SPELL_ROGUE_SHOT_IN_THE_DARK_BUFF });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_ROGUE_SHOT_IN_THE_DARK_TALENT);
+ }
+
+ void HandleAfterCast() const
+ {
+ Unit* caster = GetCaster();
+ caster->CastSpell(caster, SPELL_ROGUE_SHOT_IN_THE_DARK_BUFF, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .TriggeringSpell = GetSpell()
+ });
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_rog_shot_in_the_dark::HandleAfterCast);
+ }
+};
+
+// 257506 - Shot in the Dark (attached to 185422 - Shadow Dance and 158185 - Stealth)
+class spell_rog_shot_in_the_dark_buff : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ROGUE_SHOT_IN_THE_DARK_BUFF });
+ }
+
+ void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ GetTarget()->RemoveAurasDueToSpell(SPELL_ROGUE_SHOT_IN_THE_DARK_BUFF);
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_rog_shot_in_the_dark_buff::HandleEffectRemove, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
// 193315 - Sinister Strike
class spell_rog_sinister_strike : public SpellScript
{
@@ -1372,6 +1421,8 @@ void AddSC_rogue_spell_scripts()
RegisterSpellScript(spell_rog_ruthlessness);
RegisterSpellScript(spell_rog_shadowstrike);
RegisterSpellScript(spell_rog_shadow_focus);
+ RegisterSpellScript(spell_rog_shot_in_the_dark);
+ RegisterSpellScript(spell_rog_shot_in_the_dark_buff);
RegisterSpellScript(spell_rog_sinister_strike);
RegisterSpellScript(spell_rog_soothing_darkness);
RegisterSpellScript(spell_rog_stealth);