少年修仙传客户端代码仓库
client_linchunjie
2019-01-04 f17916c72bb1f0827d83c8c2c61446bf6ca28e03
5685 【前端】【1.4.100】聚魂一键分解功能红点提醒与逻辑优化
4个文件已修改
52 ■■■■ 已修改文件
Core/GameEngine/Model/Config/GatherSoulPropertyConfig.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/GatherSoulPropertyConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GatheringSoul/GatherSoulTotalPropertyWin.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GatheringSoul/GatheringSoulModel.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/GatherSoulPropertyConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Tuesday, December 18, 2018
//    [  Date ]:           Friday, January 04, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -17,7 +17,7 @@
        public string AttrInfo3 { get ; private set; } 
        public string AttrInfo4 { get ; private set; } 
        public string AttrInfo5 { get ; private set; } 
        public int sort { get ; private set ; }
        public string sort { get ; private set; }
        public override string getKey()
        {
@@ -39,7 +39,7 @@
            
                AttrInfo5 = rawContents[5].Trim();
            
                sort=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
                sort = rawContents[6].Trim();
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/GatherSoulPropertyConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 94d416140f232244a8491a1281aa4af3
timeCreated: 1545099843
timeCreated: 1546568196
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/GatheringSoul/GatherSoulTotalPropertyWin.cs
@@ -130,11 +130,10 @@
        int Compare(int lhs, int rhs)
        {
            var lhsConfig = Config.Instance.Get<GatherSoulPropertyConfig>(lhs);
            var rhsConfig = Config.Instance.Get<GatherSoulPropertyConfig>(rhs);
            if (lhsConfig.sort != rhsConfig.sort)
            var dict = model.propertySorts;
            if (dict != null && dict.ContainsKey(lhs) && dict.ContainsKey(rhs))
            {
                return lhsConfig.sort.CompareTo(rhsConfig.sort);
                return dict[lhs].CompareTo(dict[rhs]);
            }
            return 0;
        }
System/GatheringSoul/GatheringSoulModel.cs
@@ -15,7 +15,7 @@
        Dictionary<int, GatherSoulHoleCondition> holeConditions = new Dictionary<int, GatherSoulHoleCondition>();
        Dictionary<int, int> holeItemTypeDict;
        Dictionary<int, int> qualityMaxLevelDict;
        Dictionary<int, int> propertySortDict = new Dictionary<int, int>();
        Dictionary<int, Dictionary<int, int>> propertySortDict = new Dictionary<int, Dictionary<int, int>>();
        Dictionary<int, float> qualityResolveCostDict;
        public Dictionary<int, List<int>> gatherSoulPropertys { get; private set; }
@@ -51,6 +51,19 @@
        public int autoResolveRemainCount { get; private set; }
        public bool serverInited { get; private set; }
        public Dictionary<int, int> propertySorts
        {
            get
            {
                var job = PlayerDatas.Instance.baseData.Job;
                if (propertySortDict.ContainsKey(job))
                {
                    return propertySortDict[job];
                }
                return null;
            }
        }
        public event Action<PackType, int> prepareResolveEvent;
@@ -199,7 +212,17 @@
            {
                var config = gatherSoulPropertyConfigs[i];
                propertyComputeDict.Add(config.AttrType, new PropertyCompute(config));
                propertySortDict.Add(config.AttrType, config.sort);
                var dict = ConfigParse.GetDic<int, int>(config.sort);
                foreach (var job in dict.Keys)
                {
                    Dictionary<int, int> sortDict;
                    if (!propertySortDict.TryGetValue(job, out sortDict))
                    {
                        sortDict = new Dictionary<int, int>();
                        propertySortDict.Add(job, sortDict);
                    }
                    sortDict.Add(config.AttrType, dict[job]);
                }
            }
            var gatherSoulConfigs = Config.Instance.GetAllValues<GatherSoulConfig>();
@@ -221,12 +244,16 @@
        public int GetPropertyHighestSort(List<int> list)
        {
            var sort = -1;
            var dict = propertySorts;
            if (dict == null)
            {
                return sort;
            }
            for (int i = 0; i < list.Count; i++)
            {
                if (propertySortDict.ContainsKey(list[i]) &&
                    propertySortDict[list[i]] > sort)
                if (dict.ContainsKey(list[i]) && dict[list[i]] > sort)
                {
                    sort = propertySortDict[list[i]];
                    sort = dict[list[i]];
                }
            }
            return sort;