Пример #1
0
        public static Sprite GetResourceSprite(ResourceType resourceType, StorageDataItemBase itemData = null)
        {
            switch (resourceType)
            {
            case ResourceType.Hcoin:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconHC"));

            case ResourceType.Scoin:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconSC"));

            case ResourceType.PlayerExp:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconEXP"));

            case ResourceType.Stamina:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconST"));

            case ResourceType.SkillPoint:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconSP"));

            case ResourceType.FriendPoint:
                return(Miscs.GetSpriteByPrefab("SpriteOutput/GeneralIcon/IconFP"));
            }
            if (itemData == null)
            {
                return(null);
            }
            return(Miscs.GetSpriteByPrefab(itemData.GetIconPath()));
        }
Пример #2
0
 public void SetupView(StorageDataItemBase data, Transform parentTrans, StorageItemAction action, int loadPosition, System.Type type, bool interactable = true)
 {
     this._originColor        = base.transform.GetComponent <Image>().color;
     this._data               = data;
     this._storageItemProcess = action;
     this._type               = type;
     this._loadPosition       = loadPosition;
     base.transform.SetParent(parentTrans, false);
     if (this._data == null)
     {
         this.RealClearContent();
     }
     else
     {
         base.transform.Find("Image").gameObject.SetActive(true);
         GameObject obj2 = Miscs.LoadResource <GameObject>(data.GetIconPath(), BundleType.RESOURCE_FILE);
         base.transform.Find("Image").GetComponent <Image>().sprite = obj2.GetComponent <SpriteRenderer>().sprite;
         if (this._data is MaterialDataItem)
         {
             base.transform.Find("LevelAndCost").gameObject.SetActive(false);
             base.transform.Find("Number").gameObject.SetActive(true);
             base.transform.Find("Number/Number").GetComponent <Text>().text = this._data.number.ToString();
         }
         else
         {
             base.transform.Find("LevelAndCost").gameObject.SetActive(true);
             base.transform.Find("Number").gameObject.SetActive(false);
             base.transform.Find("LevelAndCost/LevelNumber").GetComponent <Text>().text = this._data.level.ToString();
             base.transform.Find("LevelAndCost/CostNumber").GetComponent <Text>().text  = this._data.GetCost().ToString();
         }
         base.transform.GetComponent <Button>().interactable = interactable;
         this._setupAlready = true;
     }
 }
Пример #3
0
        public static string GetResourceIconPath(ResourceType resourceType, int itemID = 0)
        {
            switch (resourceType)
            {
            case ResourceType.Hcoin:
                return("SpriteOutput/GeneralIcon/IconHC");

            case ResourceType.Scoin:
                return("SpriteOutput/GeneralIcon/IconSC");

            case ResourceType.PlayerExp:
                return("SpriteOutput/GeneralIcon/IconEXP");

            case ResourceType.Stamina:
                return("SpriteOutput/GeneralIcon/IconST");

            case ResourceType.SkillPoint:
                return("SpriteOutput/GeneralIcon/IconSP");

            case ResourceType.FriendPoint:
                return("SpriteOutput/GeneralIcon/IconFP");
            }
            if (itemID != 0)
            {
                StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(itemID, 1);

                if (dummyStorageDataItem != null)
                {
                    return(dummyStorageDataItem.GetIconPath());
                }
            }
            return(null);
        }
Пример #4
0
        public void SetupView(Goods goods, bool isSelected, int ticketID, bool isMultiCurrency = false)
        {
            ShopGoodsMetaData shopGoodsMetaDataByKey;

            this._goods           = goods;
            this._ticketID        = ticketID;
            this._isMultiCurrency = isMultiCurrency;
            this.SetItemDefaultColor();
            base.transform.Find("BG/Selected").gameObject.SetActive(isSelected);
            base.transform.Find("BG/Unselected").gameObject.SetActive(!isSelected);
            if (this._ticketID > 0)
            {
                int hCoinCost = Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict[this._ticketID];
                shopGoodsMetaDataByKey = new ShopGoodsMetaData(this._ticketID, this._ticketID, 1, 1, hCoinCost, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x7fffffff, 1, 0x2710, false);
                if (Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict.ContainsKey(this._ticketID / 10))
                {
                    hCoinCost = Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict[this._ticketID / 10];
                    shopGoodsMetaDataByKey = new ShopGoodsMetaData(this._ticketID, this._ticketID / 10, 1, 10, hCoinCost * 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x7fffffff, 1, 0x2710, false);
                }
            }
            else
            {
                shopGoodsMetaDataByKey = ShopGoodsMetaDataReader.GetShopGoodsMetaDataByKey((int)goods.get_goods_id());
            }
            StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(shopGoodsMetaDataByKey.ItemID, shopGoodsMetaDataByKey.ItemLevel);

            dummyStorageDataItem.number = shopGoodsMetaDataByKey.ItemNum;
            this.SetupSaleLabel(shopGoodsMetaDataByKey);
            base.transform.Find("FragmentIcon").gameObject.SetActive(dummyStorageDataItem is AvatarFragmentDataItem);
            Sprite spriteByPrefab = Miscs.GetSpriteByPrefab(dummyStorageDataItem.GetIconPath());

            base.transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite       = spriteByPrefab;
            base.transform.Find("ItemIcon/FrameBg").GetComponent <Image>().sprite    = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[dummyStorageDataItem.rarity]);
            base.transform.Find("ItemIcon/FrameLight").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityLightImgPath[dummyStorageDataItem.rarity]);
            base.transform.Find("ItemIcon/FrameBg").gameObject.SetActive(true);
            base.transform.Find("ItemIcon/FrameLight").gameObject.SetActive(true);
            this.SetupDesc(dummyStorageDataItem);
            this.SetupRarityView(dummyStorageDataItem);
            this.SetupStigmataTypeIcon(dummyStorageDataItem);
            this.SetupPrice(shopGoodsMetaDataByKey);
            if (goods.get_buy_times() >= shopGoodsMetaDataByKey.MaxBuyTimes)
            {
                this.SetItemGrey();
            }
            else
            {
                base.transform.Find("BG/Unselected/NowPrize").gameObject.SetActive(true);
                base.transform.Find("BG/Unselected/Empty").gameObject.SetActive(false);
                Color color = base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color;
                color.a = 1f;
                base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color = color;
                base.transform.Find("BG/Selected/NowPrize").gameObject.SetActive(true);
                base.transform.Find("BG/Selected/Empty").gameObject.SetActive(false);
                color   = base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color;
                color.a = 1f;
                base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color = color;
                base.transform.Find("ItemIcon/SellOut").gameObject.SetActive(false);
            }
        }
Пример #5
0
        private void SetupSpeicalTab()
        {
            HcoinGachaData specialGachaData = this._displayInfo.specialGachaData;
            bool           flag             = (specialGachaData != null) && (TimeUtil.Now < Miscs.GetDateTimeFromTimeStamp(specialGachaData.get_data_expire_time()));

            base.view.transform.Find("SpecialTab").gameObject.SetActive(flag);
            base.view.transform.Find("TabBtns/TabBtn_2").gameObject.SetActive(flag);
            if (!flag)
            {
                if (this._currentTabKey == "SpecialTab")
                {
                    this._currentTabKey = "HcoinTab";
                }
            }
            else
            {
                StorageDataItemBase base2 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID((int)specialGachaData.get_ticket_material_id());

                StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)specialGachaData.get_ticket_material_id(), 1);

                string gachaTicketIconPath = MiscData.GetGachaTicketIconPath((int)specialGachaData.get_ticket_material_id());
                Sprite spriteByPrefab      = !string.IsNullOrEmpty(gachaTicketIconPath) ? Miscs.GetSpriteByPrefab(gachaTicketIconPath) : null;
                if (spriteByPrefab == null)
                {
                    spriteByPrefab = Miscs.GetSpriteByPrefab(dummyStorageDataItem.GetIconPath());
                }
                base.view.transform.Find("SpecialTab/InfoPanel/Title/Time").GetComponent <Text>().text         = specialGachaData.get_common_data().get_title();
                base.view.transform.Find("SpecialTab/InfoPanel/Desc/Text").GetComponent <Text>().text          = UIUtil.ProcessStrWithNewLine(specialGachaData.get_common_data().get_content());
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Text").GetComponent <Text>().text         = LocalizationGeneralLogic.GetText(MiscData.Config.GachaTimeTextID[1], new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Text").GetComponent <Text>().text         = LocalizationGeneralLogic.GetText(MiscData.Config.GachaTimeTextID[10], new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Cost/Num").GetComponent <Text>().text     = "x" + 1;
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Cost/Icon").GetComponent <Image>().sprite = spriteByPrefab;
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Cost/Num").GetComponent <Text>().text     = "x" + 10;
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Cost/Icon").GetComponent <Image>().sprite = spriteByPrefab;
                base.view.transform.Find("SpecialTab/ActBtns/One/Added/Note").GetComponent <Text>().text       = LocalizationGeneralLogic.GetText("Menu_SpecialGachaNote", new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/One/Added/Num").GetComponent <Text>().text        = "2";
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Added/Note").GetComponent <Text>().text       = LocalizationGeneralLogic.GetText("Menu_SpecialGachaNote", new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Added/Num").GetComponent <Text>().text        = "20";
                base.view.transform.Find("SpecialTab/TicketRemain/Num").GetComponent <Text>().text             = (base2 != null) ? base2.number.ToString() : "0";
                base.view.transform.Find("SpecialTab/TicketRemain/Icon").GetComponent <Image>().sprite         = spriteByPrefab;
                UIUtil.TrySetupEventSprite(base.view.transform.Find("SpecialTab/SupplyImg/Pic").GetComponent <Image>(), specialGachaData.get_common_data().get_supply_image());
                UIUtil.TrySetupEventSprite(base.view.transform.Find("SpecialTab/InfoPanel/Title/Image").GetComponent <Image>(), specialGachaData.get_common_data().get_title_image());
                base.view.transform.Find("SpecialTab/RemainTime").gameObject.SetActive(specialGachaData.get_data_expire_timeSpecified());
                if (specialGachaData.get_data_expire_timeSpecified())
                {
                    base.view.transform.Find("SpecialTab/RemainTime/RemainTimer").GetComponent <MonoRemainTimer>().SetTargetTime(Miscs.GetDateTimeFromTimeStamp(specialGachaData.get_data_expire_time()), null, new Action(this.OnGachaDisplayDataExpired), false);
                }
                this._tabManager.SetTab("SpecialTab", base.view.transform.Find("TabBtns/TabBtn_2").GetComponent <Button>(), base.view.transform.Find("SpecialTab").gameObject);
            }
        }
Пример #6
0
        protected override bool SetupView()
        {
            StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(this._ticketID, 1);

            StorageDataItemBase base3 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(this._ticketID);

            this._currentTicketNum = (base3 != null) ? base3.number : 0;
            this._ticketPrice      = Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict[this._ticketID];
            this._lackTicketNum    = this._wantedNum - this._currentTicketNum;
            this._hcoinEnough      = Singleton <PlayerModule> .Instance.playerData.hcoin >= (this._lackTicketNum * this._ticketPrice);
            string str  = !this._hcoinEnough ? LocalizationGeneralLogic.GetText("Menu_GoToRecharge", new object[0]) : LocalizationGeneralLogic.GetText("Menu_Buy", new object[0]);
            string str2 = !this._hcoinEnough ? LocalizationGeneralLogic.GetText("Menu_GoToRechargeDesc", new object[0]) : LocalizationGeneralLogic.GetText("Menu_Desc_GachaTicketLack", new object[] { dummyStorageDataItem.GetDisplayTitle(), this._lackTicketNum *this._ticketPrice, this._lackTicketNum, dummyStorageDataItem.GetDisplayTitle() });

            base.view.transform.Find("Dialog/Content/DoubleButton/OKBtn/Text").GetComponent <Text>().text = str;
            base.view.transform.Find("Dialog/Content/Desc/DescText").GetComponent <Text>().text           = str2;
            string iconPath = dummyStorageDataItem.GetIconPath();

            base.view.transform.Find("Dialog/Content/TicketIcon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(iconPath);
            base.view.transform.Find("Dialog/Content/CurretnTickets/Content/TicketLabel").GetComponent <Text>().text = dummyStorageDataItem.GetDisplayTitle();
            base.view.transform.Find("Dialog/Content/CurretnTickets/Content/Num").GetComponent <Text>().text         = this._currentTicketNum.ToString();
            object[] replaceParams = new object[] { dummyStorageDataItem.GetDisplayTitle() };
            base.view.transform.Find("Dialog/Title/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_Title_GachaTitcketLack", replaceParams);
            return(false);
        }
        protected override bool SetupView()
        {
            string str = MiscData.AddColor("Blue", LocalizationGeneralLogic.GetText("Menu_Scoin", new object[0])) + " + " + this._scoinNum;

            if (this._burstRate > 1f)
            {
                string   str2       = str;
                string[] textArray1 = new string[] { str2, " , ", MiscData.AddColor("Blue", LocalizationGeneralLogic.GetText("Menu_Desc_Critical", new object[0])), " \x00d7 ", string.Format("{0:0%}", this._burstRate) };
                str = string.Concat(textArray1);
            }
            base.view.transform.Find("Dialog/Content/TextScoin/line/Desc").GetComponent <Text>().text = str;
            base.view.transform.Find("Dialog/Content/MaterialList").gameObject.SetActive(this._materials.Count > 0);
            if (this._materials.Count >= 1)
            {
                if (this._materials.Count > this._max_materials_num)
                {
                }
                if (!Singleton <IslandModule> .Instance.IsDropMaterials() && (this._materials.Count > 0))
                {
                }
                for (int i = 0; i < this._max_materials_num; i++)
                {
                    int       num4      = i + 1;
                    Transform transform = base.view.transform.Find(string.Format("Dialog/Content/MaterialList/{0}", num4.ToString()));
                    if (i < this._materials.Count)
                    {
                        transform.gameObject.SetActive(true);
                        int metaId = (int)this._materials[i].get_item_id();
                        int level  = (int)this._materials[i].get_level();
                        StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(metaId, level);

                        if (dummyStorageDataItem != null)
                        {
                            transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(dummyStorageDataItem.GetIconPath());
                            transform.Find("Star").GetComponent <MonoItemIconStar>().SetupView(dummyStorageDataItem.rarity, dummyStorageDataItem.rarity);
                            transform.Find("Text").GetComponent <Text>().text = string.Format("x{0}", this._materials[i].get_num());
                        }
                    }
                    else
                    {
                        transform.gameObject.SetActive(false);
                    }
                }
            }
            return(false);
        }
Пример #8
0
        private void SetupMetalNum()
        {
            base.transform.Find("SpecialDesc").gameObject.SetActive(true);
            Transform transform = base.transform.Find("SystemInfoPanel/Currency");

            switch (this._shopType)
            {
            case UIShopType.SHOP_ACTIVITY:
                base.transform.Find("SpecialDesc").gameObject.SetActive(false);
                base.transform.Find("SystemInfoPanel/Currency").gameObject.SetActive(false);
                transform = base.transform.Find("SystemInfoPanel/ActivityCurrency");
                transform.gameObject.SetActive(true);
                break;

            case UIShopType.SHOP_GACHATICKET:
                base.transform.Find("SystemInfoPanel/Currency").gameObject.SetActive(false);
                base.transform.Find("SystemInfoPanel/ActivityCurrency").gameObject.SetActive(false);
                return;

            default:
                base.transform.Find("SystemInfoPanel/ActivityCurrency").gameObject.SetActive(false);
                transform.gameObject.SetActive(true);
                break;
            }
            transform.gameObject.SetActive(this._storeDataItem.currencyIDList.Count > 0);
            for (int i = 0; i < transform.childCount; i++)
            {
                Transform child = transform.GetChild(i);
                if (i >= this._storeDataItem.currencyIDList.Count)
                {
                    child.gameObject.SetActive(false);
                }
                else
                {
                    child.gameObject.SetActive(true);
                    StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(this._storeDataItem.currencyIDList[i], 1);

                    string currencyIconPath = MiscData.GetCurrencyIconPath(dummyStorageDataItem.ID);
                    if (string.IsNullOrEmpty(currencyIconPath))
                    {
                        currencyIconPath = dummyStorageDataItem.GetIconPath();
                    }
                    child.Find("ImgMetal").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(currencyIconPath);
                    List <StorageDataItemBase> list = Singleton <StorageModule> .Instance.TryGetStorageDataItemByMetaId(this._storeDataItem.currencyIDList[i], 1);

                    int number = 0;
                    if (list.Count > 0)
                    {
                        if (dummyStorageDataItem is MaterialDataItem)
                        {
                            number = list[0].number;
                        }
                        else
                        {
                            number = list.Count;
                        }
                    }
                    child.Find("Num").GetComponent <Text>().text = number.ToString();
                }
            }
        }
Пример #9
0
        public void SetupView(StorageDataItemBase item, SelectMode selectMode = 0, bool isSelected = false, bool bShowCostOver = false, bool bUsed = false)
        {
            this._item       = item;
            this.selectMode  = selectMode;
            this._isSelected = isSelected;
            base.transform.Find("SelectedMark").gameObject.SetActive(false);
            base.transform.Find("ProtectedMark").gameObject.SetActive(false);
            base.transform.Find("InteractiveMask").gameObject.SetActive(false);
            base.transform.Find("NotEnough").gameObject.SetActive(false);
            base.transform.Find("Star").gameObject.SetActive(false);
            base.transform.Find("StigmataType").gameObject.SetActive(false);
            base.transform.Find("UnidentifyText").gameObject.SetActive(false);
            base.transform.Find("QuestionMark").gameObject.SetActive(false);
            base.transform.Find("MinusBtn").gameObject.SetActive(false);
            if (this._item == null)
            {
                base.transform.Find("ItemIcon").gameObject.SetActive(false);
                base.transform.Find("Text").gameObject.SetActive(false);
            }
            else
            {
                base.transform.Find("ItemIcon").gameObject.SetActive(true);
                base.transform.Find("Text").gameObject.SetActive(true);
                Sprite spriteByPrefab = Miscs.GetSpriteByPrefab(item.GetIconPath());
                base.transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite = spriteByPrefab;
                base.transform.Find("ItemIcon").GetComponent <Image>().color       = Color.white;
                base.transform.Find("ItemIcon").GetComponent <Image>().sprite      = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[item.rarity]);
                if ((this._item is WeaponDataItem) || (this._item is StigmataDataItem))
                {
                    base.transform.Find("Text").GetComponent <Text>().text = "LV." + item.level;
                }
                else if (this._item is MaterialDataItem)
                {
                    string str = "\x00d7" + item.number;
                    if (selectMode == SelectMode.ConsumeMaterial)
                    {
                        StorageDataItemBase base2 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(this._item.ID);

                        int num = (base2 != null) ? base2.number : 0;
                        if (this._item.number > num)
                        {
                            str = MiscData.AddColor("WarningRed", num + " / ") + MiscData.AddColor("TotalBlack", this._item.number.ToString());
                        }
                        else
                        {
                            str = MiscData.AddColor("TotalBlack", num + " / " + this._item.number);
                        }
                    }
                    base.transform.Find("Text").GetComponent <Text>().text = str;
                }
                else if (this._item is AvatarFragmentDataItem)
                {
                    base.transform.Find("Text").GetComponent <Text>().text = "\x00d7" + item.number;
                }
                else
                {
                    base.transform.Find("Text").gameObject.SetActive(false);
                }
                this.SetupRarityView();
                this.SetupStigmataTypeIcon();
                if (selectMode != SelectMode.None)
                {
                    this.SetupSelectedView(isSelected);
                }
                else
                {
                    base.transform.Find("BG/Unselected").gameObject.SetActive(true);
                    base.transform.Find("BG/Selected").gameObject.SetActive(false);
                }
                if (this.showProtected)
                {
                    this.SetupProtectedView();
                }
                this.SetupBlockSelectView();
                this.SetupCostView(bShowCostOver);
                this.SetupUsedView(bUsed);
                base.transform.Find("ItemIcon/Icon").GetComponent <Image>().material = null;
                base.transform.Find("ItemIcon/Icon").GetComponent <Image>().color    = MiscData.GetColor("TotalWhite");
                if (this._item is StigmataDataItem)
                {
                    this.SetupStigmataAffixView((this._item as StigmataDataItem).IsAffixIdentify);
                }
            }
        }
Пример #10
0
        private void SetupPrice(ShopGoodsMetaData goodsItem)
        {
            List <int> list = (this._ticketID <= 0) ? UIUtil.GetGoodsRealPrice(this._goods) : new List <int> {
                goodsItem.HCoinCost
            };

            if (this._isMultiCurrency)
            {
                if (list.Count > 3)
                {
                    base.transform.GetComponent <LayoutElement>().preferredWidth = 320f;
                }
                else
                {
                    base.transform.GetComponent <LayoutElement>().preferredWidth = 220f;
                }
            }
            Transform transform  = base.transform.Find("BG/Unselected/NowPrize");
            Transform transform2 = base.transform.Find("BG/Selected/NowPrize");
            int       num        = 1;

            if (goodsItem.HCoinCost > 0)
            {
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Hcoin");
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Hcoin");
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                else
                {
                    transform.Find("Image").GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Hcoin");
                    transform2.Find("Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Hcoin");
                    transform.Find("Num").GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find("Num").GetComponent <Text>().text      = list[num - 1].ToString();
                }
                this.SetupCurrencyColor(list[num - 1] <= Singleton <PlayerModule> .Instance.playerData.hcoin, num);
                num++;
            }
            if (goodsItem.SCoinCost > 0)
            {
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Scoin");
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Scoin");
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                else
                {
                    transform.Find("Image").GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Scoin");
                    transform2.Find("Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/RewardIcons/Scoin");
                    transform.Find("Num").GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find("Num").GetComponent <Text>().text      = list[num - 1].ToString();
                }
                this.SetupCurrencyColor(list[num - 1] <= Singleton <PlayerModule> .Instance.playerData.scoin, num);
                num++;
            }
            if (goodsItem.CostItemId > 0)
            {
                StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(goodsItem.CostItemId, 1);

                string currencyIconPath = MiscData.GetCurrencyIconPath(goodsItem.CostItemId);
                if (string.IsNullOrEmpty(currencyIconPath))
                {
                    currencyIconPath = dummyStorageDataItem.GetIconPath();
                }
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(currencyIconPath);
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(currencyIconPath);
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                else
                {
                    transform.Find("Image").GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(currencyIconPath);
                    transform2.Find("Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(currencyIconPath);
                    transform.Find("Num").GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find("Num").GetComponent <Text>().text      = list[num - 1].ToString();
                }
                int number = 0;
                StorageDataItemBase base3 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(goodsItem.CostItemId);

                if (base3 != null)
                {
                    number = base3.number;
                }
                this.SetupCurrencyColor(list[num - 1] <= number, num);
                num++;
            }
            if (goodsItem.CostItemId2 > 0)
            {
                StorageDataItemBase base4 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(goodsItem.CostItemId2, 1);

                string iconPath = MiscData.GetCurrencyIconPath(goodsItem.CostItemId2);
                if (string.IsNullOrEmpty(iconPath))
                {
                    iconPath = base4.GetIconPath();
                }
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(iconPath);
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(iconPath);
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                int num3 = 0;
                StorageDataItemBase base5 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(goodsItem.CostItemId2);

                if (base5 != null)
                {
                    num3 = base5.number;
                }
                this.SetupCurrencyColor(list[num - 1] <= num3, num);
                num++;
            }
            if (goodsItem.CostItemId3 > 0)
            {
                StorageDataItemBase base6 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(goodsItem.CostItemId3, 1);

                string str3 = MiscData.GetCurrencyIconPath(goodsItem.CostItemId3);
                if (string.IsNullOrEmpty(str3))
                {
                    str3 = base6.GetIconPath();
                }
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(str3);
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(str3);
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                int num4 = 0;
                StorageDataItemBase base7 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(goodsItem.CostItemId3);

                if (base7 != null)
                {
                    num4 = base7.number;
                }
                this.SetupCurrencyColor(list[num - 1] <= num4, num);
                num++;
            }
            if (goodsItem.CostItemId4 > 0)
            {
                StorageDataItemBase base8 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(goodsItem.CostItemId4, 1);

                string str4 = MiscData.GetCurrencyIconPath(goodsItem.CostItemId4);
                if (string.IsNullOrEmpty(str4))
                {
                    str4 = base8.GetIconPath();
                }
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(str4);
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(str4);
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                int num5 = 0;
                StorageDataItemBase base9 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(goodsItem.CostItemId4);

                if (base9 != null)
                {
                    num5 = base9.number;
                }
                this.SetupCurrencyColor(list[num - 1] <= num5, num);
                num++;
            }
            if (goodsItem.CostItemId5 > 0)
            {
                StorageDataItemBase base10 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(goodsItem.CostItemId5, 1);

                string str5 = MiscData.GetCurrencyIconPath(goodsItem.CostItemId5);
                if (string.IsNullOrEmpty(str5))
                {
                    str5 = base10.GetIconPath();
                }
                if (this._isMultiCurrency)
                {
                    transform.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(str5);
                    transform2.Find(string.Format("{0}/Image", num)).GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(str5);
                    transform.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text       = list[num - 1].ToString();
                    transform2.Find(string.Format("{0}/Num", num)).GetComponent <Text>().text      = list[num - 1].ToString();
                }
                int num6 = 0;
                StorageDataItemBase base11 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(goodsItem.CostItemId5);

                if (base11 != null)
                {
                    num6 = base11.number;
                }
                this.SetupCurrencyColor(list[num - 1] <= num6, num);
                num++;
            }
            if (list.Count < transform.childCount)
            {
                for (int i = list.Count; i < transform.childCount; i++)
                {
                    transform.GetChild(i).gameObject.SetActive(false);
                    transform2.GetChild(i).gameObject.SetActive(false);
                }
            }
            if (goodsItem.Discount < 0x2710)
            {
                int num8 = UIUtil.GetGoodsOriginPrice(this._goods)[0];
                base.transform.Find("BG/Unselected/FakePrize").gameObject.SetActive(true);
                base.transform.Find("BG/Selected/FakePrize").gameObject.SetActive(true);
                base.transform.Find("BG/Unselected/FakePrize/Num").GetComponent <Text>().text = num8.ToString();
                base.transform.Find("BG/Selected/FakePrize/Num").GetComponent <Text>().text   = num8.ToString();
            }
            else
            {
                base.transform.Find("BG/Unselected/FakePrize").gameObject.SetActive(false);
                base.transform.Find("BG/Selected/FakePrize").gameObject.SetActive(false);
            }
            if (!this._isMultiCurrency)
            {
                base.transform.Find("BG/Unselected/NowPrize/Image").gameObject.SetActive(true);
                base.transform.Find("BG/Unselected/NowPrize/x").gameObject.SetActive(true);
                base.transform.Find("BG/Unselected/NowPrize/Num").gameObject.SetActive(true);
                base.transform.Find("BG/Selected/NowPrize/Image").gameObject.SetActive(true);
                base.transform.Find("BG/Selected/NowPrize/x").gameObject.SetActive(true);
                base.transform.Find("BG/Selected/NowPrize/Num").gameObject.SetActive(true);
            }
        }