ActiveChest is now correctly tracked. Fixes #1122

This commit is contained in:
White 2015-09-29 18:12:09 +09:30
parent 98cafb5826
commit 90655adf8c
2 changed files with 5 additions and 1 deletions

View file

@ -3026,6 +3026,9 @@ namespace TShockAPI
{
return true;
}
int id = Chest.FindChest(x, y);
args.Player.ActiveChest = id;
return false;
}
@ -3043,7 +3046,7 @@ namespace TShockAPI
if (nameLen != 0 && nameLen <= 20)
args.Data.ReadString(); // Ignore the name
args.Player.ActiveChest = id;
if (TShock.CheckTilePermission(args.Player, x, y) && TShock.Config.RegionProtectChests)

View file

@ -850,6 +850,7 @@ namespace TShockAPI
if (ActiveChest != -1)
{
ActiveChest = -1;
SendData(PacketTypes.ChestOpen, "", -1);
}