Core/Spells: Remove all hardcoded restrictions for pick pocket spell effect and rely only on presence of pickpocket loot in db

This commit is contained in:
Shauren
2022-09-11 14:13:10 +02:00
parent 2556d6d705
commit 78698463ff
5 changed files with 31 additions and 12 deletions

View File

@@ -402,6 +402,24 @@ class spell_rog_mastery_main_gauche : 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);
}
};
// 79096 - Restless Blades
class spell_rog_restless_blades : public AuraScript
{
@@ -976,6 +994,7 @@ void AddSC_rogue_spell_scripts()
RegisterSpellScript(spell_rog_grand_melee);
RegisterSpellAndAuraScriptPair(spell_rog_killing_spree, spell_rog_killing_spree_aura);
RegisterSpellScript(spell_rog_mastery_main_gauche);
RegisterSpellScript(spell_rog_pickpocket);
RegisterSpellScript(spell_rog_restless_blades);
RegisterSpellScript(spell_rog_roll_the_bones);
RegisterSpellScript(spell_rog_rupture);