Scripts/Spells: Implement rogue talent Blackjack (#29205)

This commit is contained in:
Aqua Deus
2023-08-26 20:15:19 +02:00
committed by GitHub
parent 78531ed6bf
commit 772ba03939
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_rog_blackjack';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(6770, 'spell_rog_blackjack'),
(2094, 'spell_rog_blackjack');

View File

@@ -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);