Ejemplo n.º 1
0
        private void RefreshDesUI()
        {
            if (this.info == null)
            {
                this.info = BaseDataMgr.instance.GetTypeDicByType <SysMagicbottleLevelVo>();
            }
            int num = Tools_ParsePrice.MaxLevelCheck <SysMagicbottleLevelVo>(this.info, false);
            int num2;

            if (this.currlevel >= num)
            {
                SysMagicbottleLevelVo dataById = BaseDataMgr.instance.GetDataById <SysMagicbottleLevelVo>(num.ToString());
                int lastLevelDefference        = dataById.lastLevelDefference;
                num2 = ((this.currlevel - num) / lastLevelDefference + 1) * lastLevelDefference + num;
            }
            else
            {
                num2 = Tools_ParsePrice.ParseCollectRange(this.currlevel, true);
            }
            string str      = "[00ff00]/" + 3 + "[-]";
            string str2     = string.Empty;
            string newValue = string.Empty;
            int    num3     = (this.currlevel % 3 != 0) ? (this.currlevel % 3) : 3;

            str2     = "[ff0000]" + num3 + "[-]";
            newValue = "[00ff00]" + num2 + "[-]";
            string stringById  = LanguageManager.Instance.GetStringById("MagicBottle_NomalOpenTips");
            string stringById2 = LanguageManager.Instance.GetStringById("MagicBottle_GoodOpenTips");

            this.descriptionLen      = stringById.Replace("*", str2 + str);
            this.descriptianCol      = stringById2.Replace("*", newValue);
            this.textDesLegend.text  = this.descriptionLen;
            this.textDesCollect.text = this.descriptianCol;
        }
Ejemplo n.º 2
0
        private void ParseDetail(int level)
        {
            int num = Tools_ParsePrice.ParseCollectRange(level, false);

            if (num == 0)
            {
                num = 10;
            }
            string text = string.Empty;

            string[] array = new string[]
            {
                string.Empty
            };
            text = BaseDataMgr.instance.GetDataById <SysMagicbottleLevelVo>(num.ToString()).viewItems;
            if (!string.IsNullOrEmpty(text))
            {
                array = text.Split(new char[]
                {
                    ','
                });
            }
            if (array != null && array.Length != 0)
            {
                this.TableSource(array[this.position]);
                this.AllotFrame(array[this.position]);
            }
        }
Ejemplo n.º 3
0
        private void InitUI()
        {
            string str      = "[00ff00]/" + 3 + "[-]";
            string str2     = string.Empty;
            string newValue = string.Empty;

            this.currlevel = ModelManager.Instance.Get_BottleData_Level();
            this.info      = BaseDataMgr.instance.GetTypeDicByType <SysMagicbottleLevelVo>();
            int num = Tools_ParsePrice.MaxLevelCheck <SysMagicbottleLevelVo>(this.info, false);
            int num2;

            if (this.currlevel >= num)
            {
                SysMagicbottleLevelVo dataById = BaseDataMgr.instance.GetDataById <SysMagicbottleLevelVo>(num.ToString());
                int lastLevelDefference        = dataById.lastLevelDefference;
                num2 = ((this.currlevel - num) / lastLevelDefference + 1) * lastLevelDefference + num;
            }
            else
            {
                num2 = Tools_ParsePrice.ParseCollectRange(this.currlevel, true);
            }
            this.countLegend           = ModelManager.Instance.Get_BottleData_LegendCount();
            this.countCollect          = ModelManager.Instance.Get_BottleData_CollectorCount();
            this.textCountLegend.text  = this.countLegend.ToString();
            this.textCountCollect.text = this.countCollect.ToString();
            this.legendDigitBg_1.gameObject.SetActive(this.countLegend < 10);
            this.legendDigitBg_2.gameObject.SetActive(this.countLegend >= 10);
            this.collectDigitBg_1.gameObject.SetActive(this.countCollect < 10);
            this.collectDigitBg_2.gameObject.SetActive(this.countCollect >= 10);
            this.spriteLegend.color  = ((this.countLegend != 0) ? new Color(1f, 1f, 1f, 1f) : new Color(1f, 1f, 1f, 0.5f));
            this.spriteCollect.color = ((this.countCollect != 0) ? new Color(1f, 1f, 1f, 1f) : new Color(1f, 1f, 1f, 0.5f));
            int num3 = (this.currlevel % 3 != 0) ? (this.currlevel % 3) : 3;

            str2     = "[ff0000]" + num3 + "[-]";
            newValue = "[00ff00]" + num2 + "[-]";
            string stringById  = LanguageManager.Instance.GetStringById("MagicBottle_NomalOpenTips");
            string stringById2 = LanguageManager.Instance.GetStringById("MagicBottle_GoodOpenTips");

            this.descriptionLen      = stringById.Replace("*", str2 + str);
            this.descriptianCol      = stringById2.Replace("*", newValue);
            this.textDesLegend.text  = this.descriptionLen;
            this.textDesCollect.text = this.descriptianCol;
        }