From c52addbfc5d656819d540794b325a9b4d85f3840 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 26 十一月 2025 11:31:14 +0800
Subject: [PATCH] 262 幻境阁系统-客户端 性能优化,在不需要排序列表的时候就不排序

---
 Main/System/PhantasmPavilion/PhantasmPavilionManager.cs |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
index e2c81c2..b4d1eaa 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -80,14 +80,10 @@
         CheckTimeOut();
     }
 
-
-
-
     private void OnRefreshItemEvent(PackType type, int index, int itemID)
     {
         if (type != PackType.Item)
             return;
-        //瑕佷笌绛栧垝绾﹀畾绫诲瀷锛岄伩鍏嶉绻佸埛鏂�
         if (ItemConfig.Get(itemID).Type != 146)
             return;
         UpdateRedPoint();
@@ -116,7 +112,7 @@
         if (!TryGetRowCountMax(type, out int rowCountMax) || type != nowType)
             return 0;
         int id = selectId;
-        List<int> list = ShowItemList(type, tabType);
+        List<int> list = ShowItemList(type, tabType, isSort: true);
         if (list.IsNullOrEmpty() || !list.Contains(id))
             return 0;
         int index = list.IndexOf(id);
@@ -346,9 +342,9 @@
         return result == id;
     }
 
-    public List<int> ShowItemList(PhantasmPavilionType type, int tabType = 0)
+    public List<int> ShowItemList(PhantasmPavilionType type, int tabType = 0, bool isSort = false)
     {
-        var resList = new List<int>();
+        List<int> resList = new List<int>();
         switch (type)
         {
             case PhantasmPavilionType.Model:
@@ -361,7 +357,10 @@
                 resList = GetTableKeys(type);
                 break;
         }
-        resList.Sort((int a, int b) => Cmp(a, b, type));
+        if (isSort)
+        {
+            resList.Sort((int a, int b) => Cmp(a, b, type));
+        }
         return resList;
     }
 

--
Gitblit v1.8.0