Пример #1
0
 public AssetClassInfo GetAssetClassInfo(CEconAsset asset)
 {
     return(GetAssetClassInfo(Convert.ToUInt32(asset.AppId),
                              new Dictionary <string, string> {
         { asset.ClassId.ToString(), asset.InstanceId.ToString() }
     }));
 }
Пример #2
0
 /// <summary>
 /// Locates asset in Items[classid].items and marks it's inUse bool according to the inUse argument.
 /// </summary>
 /// <param name="asset">Asset to mark</param>
 /// <param name="inUse">Value to set</param>
 /// <returns>True if successful, false if not.</returns>
 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);
 }
Пример #3
0
 /// <summary>
 /// Locates an Item in the inventory.
 /// </summary>
 /// <param name="assetToFind">Specifies search params.</param>
 /// <returns></returns>
 public Item FindFirstItem(CEconAsset assetToFind)
 {
     return(Items[assetToFind.ClassId]);
 }