aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2023-08-26 21:04:36 +0200
committerGitHub <noreply@github.com>2023-08-26 21:04:36 +0200
commit4118d0bbd83ec5dd8a10b4178360c8a5b9e573ef (patch)
tree2aca11cdf661727c844638ed5f1e64bbb2027d3f /src
parent772ba03939cec66c5e34c8afd885df43f596f649 (diff)
Spells/Spells: Implement rogue talent Prey on the Weak (#29206)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index ffdad12d05a..1c25e62f9ce 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -60,6 +60,8 @@ enum RogueSpells
SPELL_ROGUE_MAIN_GAUCHE = 86392,
SPELL_ROGUE_PREMEDITATION_PASSIVE = 343160,
SPELL_ROGUE_PREMEDITATION_AURA = 343173,
+ SPELL_ROGUE_PREY_ON_THE_WEAK_TALENT = 131511,
+ SPELL_ROGUE_PREY_ON_THE_WEAK = 255909,
SPELL_ROGUE_RUTHLESS_PRECISION = 193357,
SPELL_ROGUE_SANCTUARY = 98877,
SPELL_ROGUE_SKULL_AND_CROSSBONES = 199603,
@@ -536,6 +538,28 @@ class spell_rog_pickpocket : public SpellScript
}
};
+// 131511 - Prey on the Weak
+// Called by Cheap Shot - 1833 and Kidney Shot - 408
+class spell_rog_prey_on_the_weak : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ROGUE_PREY_ON_THE_WEAK_TALENT, SPELL_ROGUE_PREY_ON_THE_WEAK });
+ }
+
+ void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ if (Unit* caster = GetCaster())
+ if (caster->HasAura(SPELL_ROGUE_PREY_ON_THE_WEAK_TALENT))
+ caster->CastSpell(GetTarget(), SPELL_ROGUE_PREY_ON_THE_WEAK, true);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_rog_prey_on_the_weak::OnApply, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
// 79096 - Restless Blades
class spell_rog_restless_blades : public AuraScript
{
@@ -1026,6 +1050,7 @@ void AddSC_rogue_spell_scripts()
RegisterSpellScript(spell_rog_kingsbane);
RegisterSpellScript(spell_rog_mastery_main_gauche);
RegisterSpellScript(spell_rog_pickpocket);
+ RegisterSpellScript(spell_rog_prey_on_the_weak);
RegisterSpellScript(spell_rog_restless_blades);
RegisterSpellScript(spell_rog_roll_the_bones);
RegisterSpellScript(spell_rog_rupture);