Core/Spells: Remove all hardcoded restrictions for pick pocket spell effect and rely only on presence of pickpocket loot in db
Port From (https://github.com/TrinityCore/TrinityCore/commit/78698463ff6b20255148fb647e9ad33a487bb09d)
This commit is contained in:
@@ -271,7 +271,7 @@ namespace Scripts.Spells.Rogue
|
||||
void FilterTargets(List<WorldObject> targets)
|
||||
{
|
||||
if (targets.Empty() || GetCaster().GetVehicleBase())
|
||||
FinishCast( SpellCastResult.OutOfRange);
|
||||
FinishCast(SpellCastResult.OutOfRange);
|
||||
}
|
||||
|
||||
void HandleDummy(uint effIndex)
|
||||
@@ -369,6 +369,23 @@ namespace Scripts.Spells.Rogue
|
||||
}
|
||||
}
|
||||
|
||||
[Script]
|
||||
class spell_rog_pickpocket : SpellScript
|
||||
{
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if (!GetExplTargetUnit() || !GetCaster().IsValidAttackTarget(GetExplTargetUnit(), GetSpellInfo()))
|
||||
return SpellCastResult.BadTargets;
|
||||
|
||||
return SpellCastResult.SpellCastOk;
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnCheckCast.Add(new CheckCastHandler(CheckCast));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 79096 - Restless Blades
|
||||
class spell_rog_restless_blades : AuraScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user