diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2023-08-26 20:15:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 20:15:19 +0200 |
commit | 772ba03939cec66c5e34c8afd885df43f596f649 (patch) | |
tree | c4f9b1858aca5b2d9cd979565cb7dd39f6e5698c /src | |
parent | 78531ed6bff3fb59c0e2367f06f2c628f12d98ed (diff) |
Scripts/Spells: Implement rogue talent Blackjack (#29205)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 25 |
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 ab79fba6484..ffdad12d05a 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -38,6 +38,8 @@ enum RogueSpells { SPELL_ROGUE_ADRENALINE_RUSH = 13750, SPELL_ROGUE_BETWEEN_THE_EYES = 199804, + SPELL_ROGUE_BLACKJACK_TALENT = 379005, + SPELL_ROGUE_BLACKJACK = 394119, SPELL_ROGUE_BLADE_FLURRY = 13877, SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK = 22482, SPELL_ROGUE_BROADSIDE = 193356, @@ -127,6 +129,28 @@ class spell_rog_backstab : public SpellScript } }; +// 379005 - Blackjack +// Called by Sap - 6770 and Blind - 2094 +class spell_rog_blackjack : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_ROGUE_BLACKJACK_TALENT, SPELL_ROGUE_BLACKJACK }); + } + + void EffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const + { + if (Unit* caster = GetCaster()) + if (caster->HasAura(SPELL_ROGUE_BLACKJACK_TALENT)) + caster->CastSpell(GetTarget(), SPELL_ROGUE_BLACKJACK, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectApplyFn(spell_rog_blackjack::EffectRemove, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); + } +}; + // 13877, 33735, (check 51211, 65956) - Blade Flurry class spell_rog_blade_flurry : public AuraScript { @@ -990,6 +1014,7 @@ class spell_rog_venomous_wounds : public AuraScript void AddSC_rogue_spell_scripts() { RegisterSpellScript(spell_rog_backstab); + RegisterSpellScript(spell_rog_blackjack); RegisterSpellScript(spell_rog_blade_flurry); RegisterSpellScript(spell_rog_cheat_death); RegisterSpellScript(spell_rog_deadly_poison); |