public static IEnumerable <SerializableItem> GetItems(this PlayerInventory source)
        {
            List <SerializableItem> result = new List <SerializableItem>();

            for (byte page = 0; page < source.items.Length; page++)
            {
                if (page == PlayerInventory.AREA || page == PlayerInventory.STORAGE)
                {
                    continue;
                }
                var pageInstance = source.items[page];
                if (pageInstance == null)
                {
                    continue;
                }
                for (byte i = 0; i < pageInstance.getItemCount(); i++)
                {
                    var item = pageInstance.getItem(i);
                    if (item == null)
                    {
                        continue;
                    }

                    result.Add(SerializableItem.CreateSerializableItem(item.item));
                }
            }
            return(result);
        }
        public static IEnumerable <SerializableItem> GetClothing(this PlayerClothing source)
        {
            ICollection <SerializableItem> result = new List <SerializableItem>();

            if (source.backpack != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.backpack, 1, source.backpackQuality, source.backpackState)));
            }
            if (source.backpack != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.glasses, 1, source.glassesQuality, source.glassesState)));
            }
            if (source.hat != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.hat, 1, source.hatQuality, source.hatState)));
            }
            if (source.mask != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.mask, 1, source.maskQuality, source.maskState)));
            }
            if (source.pants != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.pants, 1, source.pantsQuality, source.pantsState)));
            }
            if (source.shirt != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.shirt, 1, source.shirtQuality, source.shirtState)));
            }
            if (source.vest != default)
            {
                result.Add(SerializableItem.CreateSerializableItem(new Item(source.vest, 1, source.vestQuality, source.vestState)));
            }

            return(result);
        }