少年修仙传客户端代码仓库
client_Wu Xijin
2019-07-17 ec78db4a21ff57ba0caa1ad9d9a6c6d2ff8abd2f
3335 装备升星改版
3个文件已修改
102 ■■■■ 已修改文件
System/EquipStar/EquipStarEffectTipModel.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarEffectTipWin.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarMaterialCandidate.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarEffectTipModel.cs
@@ -68,11 +68,13 @@
                        });
                        var skillId = 0;
                        var skillDescription = string.Empty;
                        foreach (var config in configs)
                        {
                            if (config.star == i)
                            {
                                skillId = config.skillID;
                                skillDescription = config.description;
                                break;
                            }
                        }
@@ -83,7 +85,8 @@
                            star = i,
                            actived = eightSuit.actived,
                            properties = eightSuit.properties,
                            skillId = skillId
                            skillId = skillId,
                            skillDescription = skillDescription,
                        });
                    }
                }
@@ -103,11 +106,11 @@
            var maxStarLevel = EquipStarModel.GetMaxStarLevel(equipPosition.x);
            var starLevel = starModel.GetStarLevel(equipPosition);
            var configs = EquipStarConfig.GetConfigs(equipPosition.x, equipPosition.y);
            EquipStarConfig preConfig = null;
            var lastStarAttrCount = 0;
            for (var i = 0; i < configs.Count; i++)
            {
                var config = configs[i];
                if (config.Star <= maxStarLevel && (preConfig == null || preConfig.StarAttrInfo.Length != config.StarAttrInfo.Length))
                if (config.Star <= maxStarLevel && (lastStarAttrCount != config.StarAttrInfo.Length))
                {
                    effectInfos.Add(new StarProperty()
                    {
@@ -116,6 +119,8 @@
                        property = config.StarAttrInfo[config.StarAttrInfo.Length - 1]
                    });
                }
                lastStarAttrCount = config.StarAttrInfo.Length;
            }
            return effectInfos;
@@ -150,13 +155,16 @@
            var maxStarLevel = EquipStarModel.GetMaxStarLevel(equipPosition.x);
            var starLevel = starModel.GetStarLevel(equipPosition);
            var strengthType = EquipStrengthModel.GetEquipStrengthType(equipPosition.y);
            var lastStarStrengthLevel = 0;
            for (int i = 0; i <= maxStarLevel; i++)
            {
                var levelLimit = strengthModel.GetEquipLevelMax(strengthType, i);
                if (levelLimit != 0)
                if (levelLimit != 0 && lastStarStrengthLevel != levelLimit)
                {
                    effectInfos.Add(new StrengthLevelInfo() { star = i, actived = starLevel >= i, level = levelLimit });
                }
                lastStarStrengthLevel = levelLimit;
            }
            return effectInfos;
@@ -167,13 +175,18 @@
            var effectInfos = new List<TrainLevelInfo>();
            var maxStarLevel = EquipStarModel.GetMaxStarLevel(equipPosition.x);
            var starLevel = starModel.GetStarLevel(equipPosition);
            var type = EquipTrainModel.GetTrainType(equipPosition.y);
            var lastStarTrainLevel = 0;
            for (int i = 0; i <= maxStarLevel; i++)
            {
                var levelLimit = trainModel.GetMaxTrainLevel(equipPosition.y);
                if (levelLimit != 0)
                var config = WashLevelMaxConfig.Get(type, i);
                var levelLimit = config.levelMax;
                if (levelLimit != lastStarTrainLevel)
                {
                    effectInfos.Add(new TrainLevelInfo() { star = i, actived = starLevel >= i, level = levelLimit });
                }
                lastStarTrainLevel = levelLimit;
            }
            return effectInfos;
@@ -309,6 +322,7 @@
            public List<Int2> properties;
            public int skillId;
            public string skillDescription;
        }
        public struct StarProperty
System/EquipStar/EquipStarEffectTipWin.cs
@@ -61,7 +61,7 @@
            DisplayStrengthLimit();
            DisplayTrainLimit();
            m_ScrollRect.verticalNormalizedPosition = 0f;
            m_ScrollRect.verticalNormalizedPosition = 1f;
        }
        #endregion
@@ -73,7 +73,7 @@
                var effectInfos = model.GetSuitEffectInfos(model.equipPosition);
                foreach (var item in effectInfos)
                {
                    m_SuitBehaviours[item.Key / 3].Display(item.Value);
                    m_SuitBehaviours[item.Key / 3].Display(item.Key, item.Value);
                }
            }
            else
@@ -95,7 +95,7 @@
                    property);
                descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i])
                    : UIHelper.AppendColor(TextColType.White, descriptions[i]);
                    : UIHelper.AppendColor(TextColType.White, descriptions[i], true);
            }
            m_StarProperty.text = string.Join("\n", descriptions);
@@ -113,7 +113,7 @@
                    EquipStarEffectTipModel.GetStarNumberCHS(info.index));
                descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i])
                    : UIHelper.AppendColor(TextColType.White, descriptions[i]);
                    : UIHelper.AppendColor(TextColType.White, descriptions[i], true);
            }
            m_StengthLimit.text = string.Join("\n", descriptions);
@@ -130,7 +130,7 @@
                    EquipStarEffectTipModel.GetStarNumberCHS(info.star), info.level);
                descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i])
                    : UIHelper.AppendColor(TextColType.White, descriptions[i]);
                    : UIHelper.AppendColor(TextColType.White, descriptions[i], true);
            }
            m_GemHole.text = string.Join("\n", descriptions);
@@ -147,7 +147,7 @@
                    EquipStarEffectTipModel.GetStarNumberCHS(info.star), info.level);
                descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i])
                    : UIHelper.AppendColor(TextColType.White, descriptions[i]);
                    : UIHelper.AppendColor(TextColType.White, descriptions[i], true);
            }
            m_TrainLimit.text = string.Join("\n", descriptions);
@@ -160,9 +160,61 @@
            public Text title;
            public Text content;
            public void Display(List<EquipStarEffectTipModel.SuitEffectInfo> effectInfos)
            public void Display(int star, List<EquipStarEffectTipModel.SuitEffectInfo> effectInfos)
            {
                var actived = false;
                var lines = new List<string>();
                foreach (var effectInfo in effectInfos)
                {
                    switch (effectInfo.suitType)
                    {
                        case EquipSuitType.TwoSuit:
                            for (int i = 0; i < effectInfo.properties.Count; i++)
                            {
                                var property = effectInfo.properties[i];
                                lines.Add(string.Format("(两件){0}", PlayerPropertyConfig.GetFullDescription(property.x, property.y)));
                                lines[lines.Count - 1] = effectInfo.actived ? UIHelper.AppendColor(TextColType.Green, lines[lines.Count - 1])
                                    : UIHelper.AppendColor(TextColType.White, lines[lines.Count - 1], true);
                            }
                            break;
                        case EquipSuitType.FiveSuit:
                            for (int i = 0; i < effectInfo.properties.Count; i++)
                            {
                                var property = effectInfo.properties[i];
                                lines.Add(string.Format("(五件){0}", PlayerPropertyConfig.GetFullDescription(property.x, property.y)));
                                lines[lines.Count - 1] = effectInfo.actived ? UIHelper.AppendColor(TextColType.Green, lines[lines.Count - 1])
                                    : UIHelper.AppendColor(TextColType.White, lines[lines.Count - 1], true);
                            }
                            break;
                        case EquipSuitType.EightSuit:
                            for (int i = 0; i < effectInfo.properties.Count; i++)
                            {
                                var property = effectInfo.properties[i];
                                lines.Add(string.Format("(八件){0}", PlayerPropertyConfig.GetFullDescription(property.x, property.y)));
                                lines[lines.Count - 1] = effectInfo.actived ? UIHelper.AppendColor(TextColType.Green, lines[lines.Count - 1])
                                    : UIHelper.AppendColor(TextColType.White, lines[lines.Count - 1], true);
                            }
                            if (effectInfo.skillId > 0)
                            {
                                lines.Add(string.Format("(八件){0}", effectInfo.skillDescription));
                                lines[lines.Count - 1] = effectInfo.actived ? UIHelper.AppendColor(TextColType.Green, lines[lines.Count - 1])
                                    : UIHelper.AppendColor(TextColType.White, lines[lines.Count - 1], true);
                            }
                            break;
                    }
                    if (effectInfo.actived)
                    {
                        actived = true;
                    }
                }
                content.text = string.Join("\n", lines.ToArray());
                var titleDescription = string.Format("【{0}星】", EquipStarEffectTipModel.GetStarNumberCHS(star));
                title.text = actived ? UIHelper.AppendColor(TextColType.Green, titleDescription)
                    : UIHelper.AppendColor(TextColType.White, titleDescription, true);
            }
        }
System/EquipStar/EquipStarMaterialCandidate.cs
@@ -36,6 +36,7 @@
            m_Item.SetItem(item.config.ID, 1);
            m_Select.SetListener(SelectMaterial);
            OnSelected();
            selectModel.materialSelectEvent -= OnSelected;
            selectModel.materialSelectEvent += OnSelected;
        }
@@ -49,7 +50,14 @@
        private void SelectMaterial()
        {
            selectModel.AddMaterial(equip);
            if (!selectModel.IsSelectedMaterial(equip))
            {
                selectModel.AddMaterial(equip);
            }
            else
            {
                selectModel.RemoveMaterial(equip);
            }
        }
        private void OnSelected()