| | |
| | | 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)
|
| | | {
|
| | |
| | | mine = null;
|
| | |
|
| | | memberDic.Clear();
|
| | | memberIDList.Clear();
|
| | | deputyLeaderPlayerIDList.Clear();
|
| | | for (int i = 0; i < vNetData.MemberCount; i++)
|
| | | {
|
| | | FairyMember member = new FairyMember();
|
| | |
| | |
|
| | | // 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();
|
| | | }
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|