Fix targeting exploit!
There is an exploit with targeting, where a player can use Last Target, or manually target an item which is inside of a locked container. You can test this by taking an item and putting it into a locked container. Lock the container of course. On your staff character set the last target to that item, in my case I had just coded the empty bottle targeting for potion kegs.
Now set your accesslevel to player, and the container should be locked when you dclick it. Bring up the targeter and execute your last target or absolute target. In my case, I was able to fill an empty bottle with potion liquid.
Here is the code to fix this exploit - Place this under the OnSnoop function in LockableContainer.cs
There is an exploit with targeting, where a player can use Last Target, or manually target an item which is inside of a locked container. You can test this by taking an item and putting it into a locked container. Lock the container of course. On your staff character set the last target to that item, in my case I had just coded the empty bottle targeting for potion kegs.
Now set your accesslevel to player, and the container should be locked when you dclick it. Bring up the targeter and execute your last target or absolute target. In my case, I was able to fill an empty bottle with potion liquid.
Here is the code to fix this exploit - Place this under the OnSnoop function in LockableContainer.cs
Code:
public override bool CheckTarget( Mobile from, Server.Targeting.Target targ, object targeted )
{
if ( m_Locked && targeted != this && from.AccessLevel < AccessLevel.GameMaster )
return false;
else
return base.CheckTarget( from, targ, targeted );
}