少年修仙传客户端代码仓库
client_linchunjie
2018-08-15 7f0cf4fa6dce479290aa0bc115a0789a9103abb0
2086【前端】法宝之魂界面排序改回法宝之魂开启的顺序
1个文件已修改
38 ■■■■ 已修改文件
System/Treasure/TreasureSoulWin.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs
@@ -403,25 +403,25 @@
        int Compare(int x, int y)
        {
            Treasure treasure_x;
            Treasure treasure_y;
            if (model.TryGetTreasure(x, out treasure_x) && model.TryGetTreasure(y, out treasure_y))
            {
                var stage_x = treasure_x.treasureStages[treasure_x.StageCount - 1];
                var stage_y = treasure_y.treasureStages[treasure_y.StageCount - 1];
                bool awaking_x = PlayerDatas.Instance.baseData.LV >= stage_x.limitLevel && !treasure_x.IsMaxStage();
                bool awaking_y = PlayerDatas.Instance.baseData.LV >= stage_y.limitLevel && !treasure_y.IsMaxStage();
                if (awaking_x != awaking_y)
                {
                    return -awaking_x.CompareTo(awaking_y);
                }
                bool awoke_x = treasure_x.IsMaxStage();
                bool awoke_y = treasure_y.IsMaxStage();
                if (awoke_x != awoke_y)
                {
                    return -awoke_x.CompareTo(awoke_y);
                }
            }
            //Treasure treasure_x;
            //Treasure treasure_y;
            //if (model.TryGetTreasure(x, out treasure_x) && model.TryGetTreasure(y, out treasure_y))
            //{
            //    var stage_x = treasure_x.treasureStages[treasure_x.StageCount - 1];
            //    var stage_y = treasure_y.treasureStages[treasure_y.StageCount - 1];
            //    bool awaking_x = PlayerDatas.Instance.baseData.LV >= stage_x.limitLevel && !treasure_x.IsMaxStage();
            //    bool awaking_y = PlayerDatas.Instance.baseData.LV >= stage_y.limitLevel && !treasure_y.IsMaxStage();
            //    if (awaking_x != awaking_y)
            //    {
            //        return -awaking_x.CompareTo(awaking_y);
            //    }
            //    bool awoke_x = treasure_x.IsMaxStage();
            //    bool awoke_y = treasure_y.IsMaxStage();
            //    if (awoke_x != awoke_y)
            //    {
            //        return -awoke_x.CompareTo(awoke_y);
            //    }
            //}
            return x.CompareTo(y);
        }