From 13a8b35c191d2e3a0217948cb7c542292bfc196a Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期二, 07 四月 2026 15:22:31 +0800
Subject: [PATCH] 282 查看他人 调整属性排序

---
 Main/System/Attribute/AttributeManager.cs |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/Main/System/Attribute/AttributeManager.cs b/Main/System/Attribute/AttributeManager.cs
index bcd92ba..b013b25 100644
--- a/Main/System/Attribute/AttributeManager.cs
+++ b/Main/System/Attribute/AttributeManager.cs
@@ -78,7 +78,7 @@
             if (!PlayerPropertyConfig.HasKey(kvp.Key))
                 continue;
             PlayerPropertyConfig config = PlayerPropertyConfig.Get(kvp.Key);
-            if (kvp.Value > 0 && config.showType > 0 && config.showType < 5)
+            if (kvp.Value > 0 && config.showType > 0)
             {
                 result.Add(kvp.Key, kvp.Value);
             }
@@ -109,7 +109,11 @@
             int showTypeB = configB?.showType ?? 0;
 
             if (showTypeA != showTypeB)
-                return showTypeA.CompareTo(showTypeB);
+            {
+                int priorityA = GetShowTypePriority(showTypeA);
+                int priorityB = GetShowTypePriority(showTypeB);
+                return priorityA.CompareTo(priorityB);
+            }
 
             int showSequenceA = configA?.showSequence ?? 0;
             int showSequenceB = configB?.showSequence ?? 0;
@@ -120,4 +124,22 @@
         });
         return list;
     }
+
+    /// <summary>
+    /// 鑾峰彇showType鐨勪紭鍏堟潈锛屽�艰秺灏忚秺闈犲墠
+    /// 浼樺厛鏉冮『搴忥細[1,6,2,3,4,5]锛屽叾浠栧�兼帓鍦ㄦ渶鍚�
+    /// </summary>
+    private int GetShowTypePriority(int showType)
+    {
+        return showType switch
+        {
+            1 => 0,   // 鏈�楂樹紭鍏堟潈
+            6 => 1,
+            2 => 2,
+            3 => 3,
+            4 => 4,
+            5 => 5,
+            _ => 999  // 鏈畾涔夌殑showType鎺掑湪鏈�鍚�
+        };
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0