public static void DestroyChestDirect(int X, int Y, int id)
{
if (id < 0)
return;
if (id >= Main.chest.Length)
return;
try
{
Chest chest = Main.chest[id];
if (chest == null || chest.x != X || chest.y != Y)
return;
Main.chest[id] = null;
if (Main.player[Main.myPlayer].chest != id)
return;
Main.player[Main.myPlayer].chest = -1;
}
catch
{
}
}