private void AddArtifactContents(BundleParam.BundleItemInfo itemInfo) { GameObject gameObject = this.itemCount >= this.limited_shop_item_set_list.Count ? (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate) : ((Component)this.limited_shop_item_set_list[this.itemCount]).get_gameObject(); if (Object.op_Inequality((Object)gameObject, (Object)null)) { gameObject.SetActive(true); Vector3 localScale = gameObject.get_transform().get_localScale(); gameObject.get_transform().SetParent(this.ItemParent.get_transform()); gameObject.get_transform().set_localScale(localScale); LimitedShopSetItemListElement component = (LimitedShopSetItemListElement)gameObject.GetComponent <LimitedShopSetItemListElement>(); ArtifactParam artifactParam1 = new ArtifactParam(); ArtifactParam artifactParam2 = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(itemInfo.Name); ItemData itemData = new ItemData(); StringBuilder stringBuilder = GameUtility.GetStringBuilder(); if (itemData != null) { stringBuilder.Append(artifactParam2.name); } stringBuilder.Append(" × "); stringBuilder.Append(itemInfo.Quantity.ToString()); component.itemName.set_text(stringBuilder.ToString()); component.itemData = itemData; component.ArtifactParam = artifactParam2; this.limited_shop_item_set_list.Add(component); } ++this.itemCount; }
public List <BundleParam.BundleItemInfo> Deserialize(JSON_BundleItemInfo[] json) { if (json == null) { return((List <BundleParam.BundleItemInfo>)null); } List <BundleParam.BundleItemInfo> bundleItemInfoList = new List <BundleParam.BundleItemInfo>(); for (int index = 0; index < json.Length; ++index) { BundleParam.BundleItemInfo bundleItemInfo = new BundleParam.BundleItemInfo(); if (!bundleItemInfo.Deserialize(json[index])) { return((List <BundleParam.BundleItemInfo>)null); } bundleItemInfoList.Add(bundleItemInfo); } return(bundleItemInfoList); }