_contentIdToSkin possibly missing entriesSolved

I tested IsPaidItem using a known paid skin workshopID and it returned false. This seems to fix it, at least for IsPaidItem:

        const string WORKSHOP_ID = "workshopid";
        foreach (Steamworks.InventoryDef inventoryDef in Steamworks.SteamInventory.Definitions)
        {
            if (!ulong.TryParse(inventoryDef.GetProperty(WORKSHOP_ID), out ulong skinId))
            {
                if (!_contentIdToSkin.ContainsKey(inventoryDef.Id))
                    continue;

                skinId = (ulong)inventoryDef.Id;
            }

            //Trader08 added
            _contentIdToSkin[inventoryDef.Id] = ItemSkinDirectory.FindByInventoryDefinitionId(inventoryDef.Id);

            _workshopToContentId[skinId] = inventoryDef.Id;
        }​

what was the workshop id?

3531543941

I also realized adding the skins to _contentIdToSkin this way, it'll also return true for twitch drops (which I think is needed). 3320504333 as an example

good catch 😋

Won't setting the skin = default; mess IsOwnedOrFreeSkin?

its the same thing as what you suggested without unnecessarily looking through the skins array again.
_contentIdToSkin is populated with every available skin at the start of the function, if its not in the _contentIdToSkin collection after that its because it doesnt exist. using FindByInventoryDefinitionId is just going to iterate back through the skins array, not find anything and return default(Skin)

Ok, thanks for the explanation!

Locked automatically