fixed drop exploit

This commit is contained in:
krrios 2007-09-08 07:22:59 +00:00
parent 77992e148c
commit 08f3b44f54
2 changed files with 13 additions and 10 deletions

View file

@ -3535,7 +3535,7 @@ namespace Server
if( holding != null )
{
if( !holding.Deleted && holding.Map == Map.Internal )
if ( !holding.Deleted && holding.HeldBy == this && holding.Map == Map.Internal )
AddToBackpack( holding );
Holding = null;
@ -4392,10 +4392,11 @@ namespace Server
Mobile from = this;
Item item = from.Holding;
if( item == null )
from.Holding = null;
if ( item == null || item.HeldBy != from || item.Map != Map.Internal )
return false;
from.Holding = null;
bool bounced = true;
item.SetLastMoved();
@ -4418,10 +4419,11 @@ namespace Server
Mobile from = this;
Item item = from.Holding;
if( item == null )
from.Holding = null;
if ( item == null || item.HeldBy != from || item.Map != Map.Internal )
return false;
from.Holding = null;
bool bounced = true;
item.SetLastMoved();
@ -4444,10 +4446,11 @@ namespace Server
Mobile from = this;
Item item = from.Holding;
if( item == null )
from.Holding = null;
if ( item == null || item.HeldBy != from || item.Map != Map.Internal )
return false;
from.Holding = null;
bool bounced = true;
item.SetLastMoved();

View file

@ -964,11 +964,11 @@ namespace Server.Network
Mobile from = state.Mobile;
Item item = from.Holding;
if ( item == null )
return;
from.Holding = null;
if ( item == null || item.Deleted || item.HeldBy != from || item.Map != Map.Internal )
return;
pvSrc.Seek( 5, SeekOrigin.Current );
Mobile to = World.FindMobile( pvSrc.ReadInt32() );