Terraria.Chest.UsingChest C# (CSharp) Method

UsingChest() public static method

public static UsingChest ( int i ) : int
i int
return int
        public static int UsingChest(int i)
        {
            if (Main.chest[i] != null)
            {
                for (int index = 0; index < 255; ++index)
                {
                    if (Main.player[index].active && Main.player[index].chest == i)
                        return index;
                }
            }
            return -1;
        }