Fix item duplication caused by range checks & netIDs. Fixes #1162
This commit is contained in:
parent
4dca73a6cc
commit
dd50d41f2e
1 changed files with 4 additions and 2 deletions
|
|
@ -3322,7 +3322,8 @@ namespace TShockAPI
|
|||
// player is attempting to crash clients
|
||||
if (type < -48 || type >= Main.maxItemTypes)
|
||||
{
|
||||
args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||
// Causes item duplications. Will be re added later if necessary
|
||||
//args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -3336,7 +3337,8 @@ namespace TShockAPI
|
|||
{
|
||||
if (TShock.CheckRangePermission(args.Player, (int)(Main.item[id].position.X / 16f), (int)(Main.item[id].position.Y / 16f)))
|
||||
{
|
||||
args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||
// Causes item duplications. Will be re added if necessary
|
||||
//args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue