// Token: 0x0600174D RID: 5965 RVA: 0x000869C0 File Offset: 0x00084DC0 public void loadTranslationEconInfo() { string path = ReadWrite.PATH + "/EconInfo_" + Provider.language; if (!ReadWrite.fileExists(path, false, false)) { path = Provider.path + Provider.language + "/EconInfo.json"; if (!ReadWrite.fileExists(path, false, false)) { return; } } IDeserializer deserializer = new JSONDeserializer(); List <UnturnedEconInfo> list = new List <UnturnedEconInfo>(); list = deserializer.deserialize <List <UnturnedEconInfo> >(path); using (List <UnturnedEconInfo> .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { UnturnedEconInfo translatedItem = enumerator.Current; UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == translatedItem.itemdefid); if (unturnedEconInfo != null) { unturnedEconInfo.name = translatedItem.name; unturnedEconInfo.type = translatedItem.type; unturnedEconInfo.description = translatedItem.description; } } } }
// Token: 0x06001744 RID: 5956 RVA: 0x00086040 File Offset: 0x00084440 public ushort getInventorySkinID(int item) { UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == item); if (unturnedEconInfo == null) { return(0); } return((ushort)unturnedEconInfo.item_skin); }
// Token: 0x0600173B RID: 5947 RVA: 0x00085D94 File Offset: 0x00084194 public string getInventoryDescription(int item) { UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == item); if (unturnedEconInfo == null) { return(string.Empty); } return(unturnedEconInfo.description); }
// Token: 0x06001742 RID: 5954 RVA: 0x00085FD4 File Offset: 0x000843D4 public void getInventoryTargetID(int item, out ushort item_id, out ushort vehicle_id) { UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == item); if (unturnedEconInfo == null) { item_id = 0; vehicle_id = 0; return; } item_id = (ushort)unturnedEconInfo.item_id; vehicle_id = (ushort)unturnedEconInfo.vehicle_id; }
// Token: 0x0600173E RID: 5950 RVA: 0x00085E58 File Offset: 0x00084258 public Color getInventoryColor(int item) { UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == item); if (unturnedEconInfo == null) { return(Color.white); } uint num; if (unturnedEconInfo.name_color != null && unturnedEconInfo.name_color.Length > 0 && uint.TryParse(unturnedEconInfo.name_color, NumberStyles.HexNumber, CultureInfo.CurrentCulture, out num)) { uint num2 = num >> 16 & 255u; uint num3 = num >> 8 & 255u; uint num4 = num & 255u; return(new Color(num2 / 255f, num3 / 255f, num4 / 255f)); } return(Color.white); }
// Token: 0x0600173D RID: 5949 RVA: 0x00085E18 File Offset: 0x00084218 public bool getInventoryScrapable(int item) { UnturnedEconInfo unturnedEconInfo = TempSteamworksEconomy.econInfo.Find((UnturnedEconInfo x) => x.itemdefid == item); return(unturnedEconInfo != null && unturnedEconInfo.scrapable); }