少年修仙传客户端代码仓库
client_linchunjie
2018-09-20 b9025c6ea8830f2e0b918c80236b8afa41f533d7
3638【前端】潜力溶彩石添加修改
1个文件已修改
31 ■■■■■ 已修改文件
System/Treasure/TreasurePotentialPanel.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasurePotentialPanel.cs
@@ -89,6 +89,7 @@
                    if (!isMax)
                    {
                        AutoSelectPotentialBook();
                        DisplayUpgradeCost();
                        DisplayGetSkill();
                        DisplaySuccessRatio();
@@ -179,7 +180,8 @@
            var isMax = level >= config.SkillMaxLV;
            if (!isMax)
            {
                DisplayPotentialBook(0);
                AutoSelectPotentialBook();
                DisplayPotentialBook(model.selectedPotentialBook);
            }
            model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
@@ -510,6 +512,33 @@
            }
        }
        void AutoSelectPotentialBook()
        {
            var potential = m_Treasure.GetPotential(model.selectedPotential);
            if (potential == null)
            {
                return;
            }
            var levelUpType = model.GetSkillLevelUpType(potential.id);
            var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
            var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
            if (config == null)
            {
                return;
            }
            var itemId = config.Meterial2ID.Length > 0 ? config.Meterial2ID[0] : 0;
            if (itemId != 0)
            {
                var own = playerPack.GetItemCountByID(PackType.rptItem, itemId);
                var need = config.MeterialNum2[0];
                var rate = config.Rate[0];
                if (rate >= 60 && own >= need)
                {
                    model.selectedPotentialBook = itemId;
                }
            }
        }
        private void DisplayUpgradeCost()
        {
            var potential = m_Treasure.GetPotential(selectedPotential);