Ejemplo n.º 1
0
        public List <Goods_goods.GoodShowData> GetEquipShowAttrs(LocalSave.EquipOne one)
        {
            List <Goods_goods.GoodShowData> list = new List <Goods_goods.GoodShowData>();
            int         level    = one.Level;
            Equip_equip beanById = base.GetBeanById(one.EquipID);
            int         index    = 0;
            int         length   = beanById.Attributes.Length;

            while (index < length)
            {
                Goods_goods.GoodData goodData = Goods_goods.GetGoodData(beanById.Attributes[index]);
                level = MathDxx.Clamp(level, 0, one.CurrentMaxLevel);
                if (goodData.percent)
                {
                    goodData.value += ((level - 1) * beanById.AttributesUp[index]) * 100;
                }
                else
                {
                    goodData.value += (level - 1) * beanById.AttributesUp[index];
                }
                goodData.value = (long)(goodData.value * (1f + GameLogic.SelfAttributeShow.GetUpPercent(one.Position)));
                Goods_goods.GoodShowData goodShowData = Goods_goods.GetGoodShowData(goodData);
                if (one.IsBaby && !goodData.goodType.Contains("EquipBaby:"))
                {
                    string   languageByTID = GameLogic.Hold.Language.GetLanguageByTID("Attr_BabyParentContent", Array.Empty <object>());
                    object[] args          = new object[] { languageByTID, goodShowData.goodType };
                    goodShowData.goodType = Utils.FormatString("{0}{1}", args);
                }
                list.Add(goodShowData);
                index++;
            }
            return(list);
        }
Ejemplo n.º 2
0
        public List <string> GetEquipShowAddAttributes(LocalSave.EquipOne one)
        {
            List <string> list     = new List <string>();
            Equip_equip   beanById = base.GetBeanById(one.EquipID);
            int           index    = 0;
            int           length   = beanById.AdditionSkills.Length;

            while (index < length)
            {
                string item = string.Empty;
                if (!int.TryParse(beanById.AdditionSkills[index], out int num3))
                {
                    string str2 = beanById.AdditionSkills[index];
                    Goods_goods.GoodShowData goodShowData = Goods_goods.GetGoodShowData(str2);
                    if (one.IsBaby && !str2.Contains("EquipBaby:"))
                    {
                        string   languageByTID = GameLogic.Hold.Language.GetLanguageByTID("Attr_BabyParentContent", Array.Empty <object>());
                        object[] args          = new object[] { languageByTID, goodShowData.goodType };
                        goodShowData.goodType = Utils.FormatString("{0}{1}", args);
                    }
                    item = goodShowData.ToString();
                }
                else
                {
                    object[] args = new object[] { num3 };
                    item = GameLogic.Hold.Language.GetLanguageByTID(Utils.FormatString("技能描述{0}", args), Array.Empty <object>());
                }
                list.Add(item);
                index++;
            }
            return(list);
        }
Ejemplo n.º 3
0
        public List <string> GetEquipAttributesNext(LocalSave.EquipOne one)
        {
            LocalSave.EquipOne one2 = new LocalSave.EquipOne {
                EquipID = one.EquipID,
                Level   = one.Level + 1
            };
            List <Goods_goods.GoodData> equipAttributes = this.GetEquipAttributes(one);
            List <Goods_goods.GoodData> list2           = this.GetEquipAttributes(one2);
            List <string> list3    = new List <string>();
            Equip_equip   beanById = base.GetBeanById(one.EquipID);
            int           index    = 0;
            int           length   = beanById.Attributes.Length;

            while (index < length)
            {
                Goods_goods.GoodData goodData = Goods_goods.GetGoodData(beanById.Attributes[index]);
                string item = string.Empty;
                if (goodData.percent)
                {
                    object[] args = new object[] { beanById.AttributesUp[index] };
                    item = item + Utils.FormatString("+ {0}%", args);
                }
                else
                {
                    equipAttributes[index].value = (long)(equipAttributes[index].value * (1f + GameLogic.SelfAttributeShow.GetUpPercent(one.Position)));
                    list2[index].value           = (long)(list2[index].value * (1f + GameLogic.SelfAttributeShow.GetUpPercent(one.Position)));
                    object[] args = new object[] { list2[index].value - equipAttributes[index].value };
                    item = item + Utils.FormatString("+ {0}", args);
                }
                list3.Add(item);
                index++;
            }
            return(list3);
        }
        public float GetGoldDropPercent(int layer)
        {
            string[] stageLevelAttributes = this.GetStageLevelAttributes(layer);
            int      index  = 0;
            int      length = stageLevelAttributes.Length;

            while (index < length)
            {
                Goods_goods.GoodData goodData = Goods_goods.GetGoodData(stageLevelAttributes[index]);
                if (goodData.goodType == "GoldDrop%")
                {
                    return(1f + (((float)goodData.value) / 100f));
                }
                index++;
            }
            return(1f);
        }
        public List <string> GetAttributes(LocalSave.CardOne one)
        {
            List <string> list     = new List <string>();
            Skill_slotout beanById = base.GetBeanById(one.CardID);

            if (beanById != null)
            {
                if (beanById.BaseAttributes.Length != beanById.AddAttributes.Length)
                {
                    object[] args = new object[] { one.CardID };
                    SdkManager.Bugly_Report("Skill_slotoutModel_Extra", Utils.FormatString("GetAttributes[{0}] attributes is error.", args));
                    return(list);
                }
                int index  = 0;
                int length = beanById.BaseAttributes.Length;
                while (index < length)
                {
                    string str2;
                    string str = beanById.BaseAttributes[index];
                    float  num = beanById.AddAttributes[index];
                    Goods_goods.GoodData goodData = Goods_goods.GetGoodData(str);
                    if (goodData.percent)
                    {
                        num  = goodData.value + (((one.level - 1) * num) * 100f);
                        num /= 100f;
                        str2 = num.ToString();
                    }
                    else
                    {
                        str2 = (goodData.value + ((one.level - 1) * ((long)num))).ToString();
                    }
                    object[] args = new object[] { goodData.goodType, goodData.GetSymbolString(), str2 };
                    str = Utils.FormatString("{0} {1} {2}", args);
                    list.Add(str);
                    index++;
                }
            }
            return(list);
        }
Ejemplo n.º 6
0
        public List <Goods_goods.GoodData> GetEquipAttributes(LocalSave.EquipOne one)
        {
            List <Goods_goods.GoodData> list = new List <Goods_goods.GoodData>();
            Equip_equip beanById             = base.GetBeanById(one.EquipID);
            int         level  = one.Level;
            int         index  = 0;
            int         length = beanById.Attributes.Length;

            while (index < length)
            {
                Goods_goods.GoodData goodData = Goods_goods.GetGoodData(beanById.Attributes[index]);
                if (goodData.percent)
                {
                    goodData.value += ((level - 1) * beanById.AttributesUp[index]) * 100;
                }
                else
                {
                    goodData.value += (level - 1) * beanById.AttributesUp[index];
                }
                list.Add(goodData);
                index++;
            }
            return(list);
        }