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:
@@ -1039,9 +1039,11 @@ namespace Game.Spells
|
||||
|
||||
if (HasAttribute(SpellCustomAttributes.PickPocket))
|
||||
{
|
||||
if (unitTarget.IsTypeId(TypeId.Player))
|
||||
Creature targetCreature = unitTarget.ToCreature();
|
||||
if (targetCreature == null)
|
||||
return SpellCastResult.BadTargets;
|
||||
else if ((unitTarget.GetCreatureTypeMask() & (uint)CreatureType.MaskHumanoidOrUndead) == 0)
|
||||
|
||||
if (!Loots.LootStorage.Pickpocketing.HaveLootFor(targetCreature.GetCreatureTemplate().PickPocketId))
|
||||
return SpellCastResult.TargetNoPockets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user