blob: 0d52e491c8257f20ef4844f675bfdd84cb4f96ad (
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
using System;
using KKSG;
using XUtliPoolLib;
namespace XMainClient
{
internal class XDragonGuildMember : IComparable<XDragonGuildMember>
{
public static int ONLINE_TIME = -1;
public ulong uid;
public string name;
public int profession = 1;
public uint ppt;
public uint level;
public DragonGuildPosition position;
public int time;
public uint vip;
public bool isOnline;
public uint liveness;
public uint paymemberid;
public uint titleID;
public static DragonGuildMemberSortType sortType = DragonGuildMemberSortType.DGMST_ID;
public static ulong playerID = 0UL;
public static int dir = -1;
public static int[] DefaultSortDirection = new int[]
{
1,
-1,
-1,
-1,
-1,
-1,
1
};
public string GetLiveness()
{
return this.liveness.ToString();
}
public int CompareTo(XDragonGuildMember other)
{
int num = 0;
bool flag = XDragonGuildMember.playerID != 0UL && this.uid != other.uid;
if (flag)
{
bool flag2 = this.uid == XDragonGuildMember.playerID;
if (flag2)
{
return -1;
}
bool flag3 = other.uid == XDragonGuildMember.playerID;
if (flag3)
{
return 1;
}
}
bool flag4 = this.ppt == 0u && other.ppt > 0u;
int result;
if (flag4)
{
result = 1;
}
else
{
bool flag5 = this.ppt != 0u && other.ppt == 0u;
if (flag5)
{
result = -1;
}
else
{
switch (XDragonGuildMember.sortType)
{
case DragonGuildMemberSortType.DGMST_TITLE:
num = this.titleID.CompareTo(other.titleID);
break;
case DragonGuildMemberSortType.DGMST_LEVEL:
num = this.level.CompareTo(other.level);
break;
case DragonGuildMemberSortType.DGMST_POSITION:
num = -this.position.CompareTo(other.position);
break;
case DragonGuildMemberSortType.DGMST_PPT:
num = this.ppt.CompareTo(other.ppt);
break;
case DragonGuildMemberSortType.DGMST_ACTIVE:
num = this.liveness.CompareTo(other.liveness);
break;
case DragonGuildMemberSortType.DGMST_ONLINE:
num = this.isOnline.CompareTo(other.isOnline);
break;
case DragonGuildMemberSortType.DGMST_NAME:
num = this.name.CompareTo(other.name);
break;
case DragonGuildMemberSortType.DGMST_PROFESSION:
num = this.profession.CompareTo(other.profession);
break;
case DragonGuildMemberSortType.DGMST_TIME:
num = this.time.CompareTo(other.time);
break;
}
bool flag6 = num == 0;
if (flag6)
{
num = this.uid.CompareTo(other.uid);
}
result = num * XDragonGuildMember.dir;
}
}
return result;
}
public void Set(DragonGuildMembersInfo data)
{
this.uid = data.roleid;
this.name = data.name;
this.position = (DragonGuildPosition)data.position;
this.ppt = data.ppt;
this.level = data.level;
this.profession = XFastEnumIntEqualityComparer<RoleType>.ToInt(data.profession);
this.time = (int)data.lastlogin;
this.vip = data.vip;
this.paymemberid = data.paymemberid;
this.isOnline = data.isonline;
this.liveness = data.activity;
bool flag = data.lastlogin == 0u;
if (flag)
{
this.time = XDragonGuildMember.ONLINE_TIME;
}
this.titleID = data.title;
}
}
}
|