diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/GroupMember.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/GroupMember.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/GroupMember.cs | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/GroupMember.cs b/Client/Assets/Scripts/XMainClient/GroupMember.cs new file mode 100644 index 00000000..20b44412 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/GroupMember.cs @@ -0,0 +1,105 @@ +using System;
+using KKSG;
+
+namespace XMainClient
+{
+ public class GroupMember : IComparable<GroupMember>
+ {
+ public int profession = 1;
+
+ public string userName;
+
+ public uint stageID;
+
+ public ulong userID;
+
+ public ulong groupID;
+
+ public string groupName;
+
+ public uint fightValue;
+
+ public uint type;
+
+ public uint timeIndex;
+
+ public uint state;
+
+ public uint createTime;
+
+ public bool isselfingroup = false;
+
+ public ulong issueIndex = 0UL;
+
+ public static TitleSelector sortSeletor = TitleSelector.Nomal;
+
+ public static int dir = -1;
+
+ public void Setup(GroupChatFindRoleInfo info)
+ {
+ this.userID = info.roleid;
+ this.profession = (int)info.roleprofession;
+ this.userName = info.rolename;
+ this.groupID = info.groupchatID;
+ this.groupName = info.groupchatName;
+ this.stageID = info.stageID;
+ this.type = info.type;
+ this.fightValue = info.fighting;
+ this.timeIndex = info.time;
+ this.state = info.state;
+ this.createTime = info.issuetime;
+ this.issueIndex = info.issueIndex;
+ this.isselfingroup = false;
+ }
+
+ public void Setup(GroupChatFindTeamInfo info)
+ {
+ this.userID = info.leaderroleid;
+ this.userName = "";
+ this.profession = 1;
+ this.groupID = info.groupchatID;
+ this.groupName = info.groupchatName;
+ this.stageID = info.stageID;
+ this.type = info.type;
+ this.fightValue = info.fighting;
+ this.timeIndex = info.time;
+ this.state = info.state;
+ this.createTime = info.issuetime;
+ this.issueIndex = info.issueIndex;
+ this.isselfingroup = info.isselfingroup;
+ }
+
+ public void Release()
+ {
+ GroupMemberPool.Release(this);
+ }
+
+ public static GroupMember Get()
+ {
+ return GroupMemberPool.Get();
+ }
+
+ public int CompareTo(GroupMember other)
+ {
+ int num = 0;
+ switch (GroupMember.sortSeletor)
+ {
+ case TitleSelector.Stage:
+ num = this.stageID.CompareTo(other.stageID);
+ break;
+ case TitleSelector.Fight:
+ num = this.fightValue.CompareTo(other.fightValue);
+ break;
+ case TitleSelector.Time:
+ num = this.timeIndex.CompareTo(other.timeIndex);
+ break;
+ }
+ bool flag = num == 0;
+ if (flag)
+ {
+ num = this.createTime.CompareTo(other.createTime);
+ }
+ return num * GroupMember.dir;
+ }
+ }
+}
|