blob: 20b44412bea79416f62c62b2c3ac564c352b6a61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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;
}
}
}
|