summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Guild/XGuildMemberBasicInfo.cs
blob: 4891a8f2b32513c0bb5d61e3d34ffbe3425be246 (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
using System;

namespace XMainClient
{
	internal class XGuildMemberBasicInfo : IComparable<XGuildMemberBasicInfo>
	{
		public static int ONLINE_TIME = -1;

		public ulong uid;

		public string name;

		public int profession = 1;

		public uint ppt;

		public uint level;

		public GuildPosition position;

		public int time;

		public uint vip;

		public bool isOnline;

		public uint liveness;

		public uint paymemberid;

		public uint titleID;

		public bool isInherit;

		public static GuildMemberSortType sortType = GuildMemberSortType.GMST_ID;

		public static ulong playerID = 0UL;

		public static int dir = -1;

		public static int[] DefaultSortDirection = new int[]
		{
			1,
			1,
			1,
			-1,
			-1,
			-1,
			1,
			-1,
			1,
			-1,
			1
		};

		public string GetLiveness()
		{
			return this.liveness.ToString();
		}

		public int CompareTo(XGuildMemberBasicInfo other)
		{
			int num = 0;
			bool flag = XGuildMemberBasicInfo.playerID != 0UL && this.uid != other.uid;
			if (flag)
			{
				bool flag2 = this.uid == XGuildMemberBasicInfo.playerID;
				if (flag2)
				{
					return -1;
				}
				bool flag3 = other.uid == XGuildMemberBasicInfo.playerID;
				if (flag3)
				{
					return 1;
				}
			}
			switch (XGuildMemberBasicInfo.sortType)
			{
			case GuildMemberSortType.GMST_NAME:
				num = this.name.CompareTo(other.name);
				break;
			case GuildMemberSortType.GMST_PROFESSION:
				num = this.profession.CompareTo(other.profession);
				break;
			case GuildMemberSortType.GMST_TITLE:
				num = this.titleID.CompareTo(other.titleID);
				break;
			case GuildMemberSortType.GMST_LEVEL:
				num = this.level.CompareTo(other.level);
				break;
			case GuildMemberSortType.GMST_POSITION:
				num = -this.position.CompareTo(other.position);
				break;
			case GuildMemberSortType.GMST_TIME:
				num = this.time.CompareTo(other.time);
				break;
			case GuildMemberSortType.GMST_ACTIVE:
				num = this.liveness.CompareTo(other.liveness);
				break;
			case GuildMemberSortType.GMST_INHERIT:
				num = this.isInherit.CompareTo(other.isInherit);
				break;
			case GuildMemberSortType.GMST_ONLINE:
				num = this.isOnline.CompareTo(other.isOnline);
				break;
			case GuildMemberSortType.GMST_PPT:
				num = this.ppt.CompareTo(other.ppt);
				break;
			}
			bool flag4 = num == 0;
			if (flag4)
			{
				num = this.uid.CompareTo(other.uid);
			}
			return num * XGuildMemberBasicInfo.dir;
		}
	}
}