fix(Core/Spells): Remove all hardcoded restrictions for pick pocket sp… (#14788)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
Skjalf
2023-01-29 12:12:21 -03:00
committed by GitHub
parent b3d4d36398
commit 2aeeee9c83
7 changed files with 34 additions and 14 deletions

View File

@@ -675,6 +675,24 @@ class spell_rog_tricks_of_the_trade_proc : public AuraScript
}
};
class spell_rog_pickpocket : public SpellScript
{
PrepareSpellScript(spell_rog_pickpocket);
SpellCastResult CheckCast()
{
if (!GetExplTargetUnit() || !GetCaster()->IsValidAttackTarget(GetExplTargetUnit(), GetSpellInfo()))
return SPELL_FAILED_BAD_TARGETS;
return SPELL_CAST_OK;
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_rog_pickpocket::CheckCast);
}
};
void AddSC_rogue_spell_scripts()
{
RegisterSpellScript(spell_rog_savage_combat);
@@ -690,4 +708,5 @@ void AddSC_rogue_spell_scripts()
RegisterSpellScript(spell_rog_shiv);
RegisterSpellScript(spell_rog_tricks_of_the_trade);
RegisterSpellScript(spell_rog_tricks_of_the_trade_proc);
RegisterSpellScript(spell_rog_pickpocket);
}