少年修仙传客户端代码仓库
client_linchunjie
2018-09-20 531a95642646678ba737ad8e512e8f623e83b966
3610 【前端】法宝之魂添加排序
3个文件已修改
23 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, September 03, 2018
//    [  Date ]:           Thursday, September 20, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -20,6 +20,7 @@
        public string itemAward { get ; private set; } 
        public int[] successList;
        public int treasureId { get ; private set ; }
        public int sort { get ; private set ; }
        public string Icon { get ; private set; } 
        public string Name { get ; private set; } 
        public string targetDescription { get ; private set; } 
@@ -56,13 +57,15 @@
            
                treasureId=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; 
            
                Icon = rawContents[9].Trim();
                sort=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0;
            
                Name = rawContents[10].Trim();
                Icon = rawContents[10].Trim();
            
                targetDescription = rawContents[11].Trim();
                Name = rawContents[11].Trim();
            
                effectId=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0;
                targetDescription = rawContents[12].Trim();
                effectId=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 761a8477b6259554ab927daec347dba7
timeCreated: 1535981375
timeCreated: 1537429075
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Treasure/TreasureSoulWin.cs
@@ -423,11 +423,11 @@
        int Compare(int x, int y)
        {
            TreasureSpecialData special_x;
            TreasureSpecialData special_y;
            if (model.TryGetTreasureSoul(x, out special_x) && model.TryGetTreasureSoul(y, out special_y))
            var leftConfig = Config.Instance.Get<TreasurePrivilegeConfig>(x);
            var rightConfig = Config.Instance.Get<TreasurePrivilegeConfig>(y);
            if (leftConfig != null && rightConfig != null)
            {
                return special_x.treasureId.CompareTo(special_y.treasureId);
                return leftConfig.sort.CompareTo(rightConfig.sort);
            }
            return x.CompareTo(y);
        }