public static ulong FindSkin(int itemID, int skinID) { ItemDefinition itemDefinition = ItemManager.FindItemDefinition(itemID); if (itemDefinition == null) { return(0uL); } IPlayerItemDefinition itemDefinition2 = PlatformService.Instance.GetItemDefinition(skinID); if (itemDefinition2 != null) { ulong workshopDownload = itemDefinition2.WorkshopDownload; if (workshopDownload != 0L) { string itemShortName = itemDefinition2.ItemShortName; if (itemShortName == itemDefinition.shortname || itemShortName == itemDefinition.name) { return(workshopDownload); } } } for (int i = 0; i < itemDefinition.skins.Length; i++) { if (itemDefinition.skins[i].id == skinID) { return((ulong)skinID); } } return(0uL); }
internal void Init(IPlayerItemDefinition item) { this.item = item; Icon.Load(item.IconUrl); Name.text = item.Name; Price.text = item.LocalPriceFormatted; }
public void Show(IPlayerItemDefinition item) { this.item = item; Icon.Load(item.IconUrl); Name.text = item.Name; Description.text = item.Description.BBCodeToUnity(); Price.text = item.LocalPriceFormatted; base.gameObject.SetActive(true); GetComponent <CanvasGroup>().alpha = 0f; LeanTween.alphaCanvas(GetComponent <CanvasGroup>(), 1f, 0.1f); }
public void Init(int index, IPlayerItemDefinition def) { Index = index; Name.text = def.Name; Price.text = def.LocalPriceFormatted; }