CSharpTradeOffers.Trading.Inventory.MarkAsset C# (CSharp) Méthode

MarkAsset() public méthode

Locates asset in Items[classid].items and marks it's inUse bool according to the inUse argument.
public MarkAsset ( CEconAsset asset, bool inUse ) : bool
asset CEconAsset Asset to mark
inUse bool Value to set
Résultat bool
        public bool MarkAsset(CEconAsset asset, bool inUse)
        {
            foreach (RgInventoryItem item in Items[asset.ClassId].Items.Where(item => item.Id == asset.AssetId))
            {
                item.InUse = inUse;
                return true;
            }
            return false;
        }