From 911a0b72e3415c9d3aba121bc532160da77c1afa Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 22 十月 2025 21:05:02 +0800
Subject: [PATCH] 65 子 【公会】基础主体 / 【公会】基础主体-客户端

---
 Main/System/Guild/PlayerFairyData.cs |   44 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/Main/System/Guild/PlayerFairyData.cs b/Main/System/Guild/PlayerFairyData.cs
index d058ee8..7b21d7f 100644
--- a/Main/System/Guild/PlayerFairyData.cs
+++ b/Main/System/Guild/PlayerFairyData.cs
@@ -23,14 +23,15 @@
     public FairyMember mine = null;
     public event Action OnRefreshFairyInfo;
     public event Action OnRefreshFairyMine; //鐜╁鍦ㄥ叕浼氶噷鐨勬暟鎹�
-    private Dictionary<int, FairyMember> memberDic = new Dictionary<int, FairyMember>();
+    Dictionary<int, FairyMember> memberDic = new Dictionary<int, FairyMember>();
+    public List<int> memberIDList = new List<int>();
 
     // 0-鎴愬憳锛�1-绮捐嫳锛�2-鍓洘涓伙紝3-鐩熶富
     public int leaderID;
     // // 绮捐嫳
-    // public List<int> elitePlayerIDList = new List<int>();
+    public List<int> elitePlayerIDList = new List<int>();
     // // 鍓洘涓�
-    // public List<int> deputyLeaderPlayerIDList = new List<int>();
+    public List<int> deputyLeaderPlayerIDList = new List<int>();
 
     public void OnRefreshGuildInfo(HA520_tagMCRoleFamilyInfo vNetData)
     {
@@ -55,6 +56,8 @@
         mine = null;
 
         memberDic.Clear();
+        memberIDList.Clear();
+        deputyLeaderPlayerIDList.Clear();
         for (int i = 0; i < vNetData.MemberCount; i++)
         {
             FairyMember member = new FairyMember();
@@ -89,17 +92,20 @@
 
             // if (member.FmLV == 1)
             // {
-            //     eliteList.Add(member);
+            //     elitePlayerIDList.Add(member.PlayerID);
             // }
-            // else if (member.FamilyLV == 2)
-            // {
-            //     deputyLeaderList.Add(member);
-            // }
+            if (member.FmLV == 2)
+            {
+                deputyLeaderPlayerIDList.Add(member.PlayerID);
+            }
             if (member.FmLV == 3)
             {
                 leaderID = (int)member.PlayerID;
             }
         }
+
+        memberIDList.AddRange(memberDic.Keys);
+        memberIDList.Sort(SortMember);
 
         if (OnRefreshFairyInfo != null) OnRefreshFairyInfo();
     }
@@ -128,9 +134,31 @@
         fairy = null;
         mine = null;
         memberDic.Clear();
+        memberIDList.Clear();
         leaderID = 0;
     }
 
+    int SortMember(int id1, int id2)
+    {
+        var memberA = memberDic[id1];
+        var memberB = memberDic[id2];
+        if (memberA.FmLV != memberB.FmLV)
+        {
+            return memberB.FmLV.CompareTo(memberA.FmLV);
+        }
+
+        if (memberA.FightPower != memberB.FightPower)
+        {
+            return memberB.FightPower.CompareTo(memberA.FightPower);
+        }
+
+        if (memberA.JoinTime != memberB.JoinTime)
+        {
+            return memberA.JoinTime.CompareTo(memberB.JoinTime);
+        }
+        return memberA.PlayerID.CompareTo(memberB.PlayerID);
+    }
+
 }
 
 

--
Gitblit v1.8.0