少年修仙传客户端代码仓库
client_linchunjie
2018-09-18 ba4d3d21ba7ee923021dc46bed3e59ed7ae092dd
1955 【前端】不能使用低级材料,没有及时清除低级材料还可以继续使用
1个文件已修改
23 ■■■■■ 已修改文件
System/Treasure/TreasurePotentialPanel.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasurePotentialPanel.cs
@@ -739,6 +739,26 @@
            }
        }
        private bool ContainsPotentialBook(int potentialBook)
        {
            if (potentialBook == 0)
            {
                return false;
            }
            var potential = m_Treasure.GetPotential(selectedPotential);
            var levelUpType = model.GetSkillLevelUpType(potential.id);
            var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
            var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
            for (int i = 0; i < config.Meterial2ID.Length; i++)
            {
                if (config.Meterial2ID[i] == potentialBook)
                {
                    return true;
                }
            }
            return false;
        }
        private int GetNextPotential(int _potentialId)
        {
            for (int i = 0; i < m_Treasure.potentials.Count; i++)
@@ -785,8 +805,9 @@
                    }
                }
            }
            var levelUpConfig = GetPotentialLevelUpConfig();
            if (levelUpConfig.own < levelUpConfig.need)
            if (levelUpConfig.own < levelUpConfig.need || !ContainsPotentialBook(model.selectedPotentialBook))
            {
                model.selectedPotentialBook = 0;
            }