summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs
blob: 83ed92754bd8609c8b2a0e4dd86cf961bf126071 (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
using System;
using KKSG;
using XUtliPoolLib;

namespace XMainClient
{
	internal class XTeamMemberBriefData : XDataBase, IComparable<XTeamMemberBriefData>
	{
		public bool isTarja
		{
			get
			{
				return this.tarjatime > 0u;
			}
		}

		public ulong uid;

		public string name;

		public RoleType profession;

		public XTeamPosition position;

		public int level;

		public uint ppt;

		public ulong guildid;

		public XTeamRelation relation = new XTeamRelation();

		public uint vip;

		public uint paymemberid;

		public bool robot;

		public ulong dragonguildid;

		public bool regression = false;

		private uint tarjatime;

		public void SetData(TeamMember data, string leaderName)
		{
			this.uid = data.memberID;
			this.name = data.name;
			this.profession = data.profession;
			this.level = data.level;
			this.ppt = data.powerpoint;
			this.position = ((this.name == leaderName) ? XTeamPosition.TP_LEADER : XTeamPosition.TP_MEMBER);
			this.guildid = data.guildid;
			this.robot = data.robot;
			this.tarjatime = data.tarjatime;
			this.dragonguildid = data.dragonguildid;
			this.regression = data.kingback;
		}

		public override void Init()
		{
			base.Init();
			this.position = XTeamPosition.TP_MEMBER;
		}

		public override void Recycle()
		{
			base.Recycle();
			XDataPool<XTeamMemberBriefData>.Recycle(this);
		}

		public int CompareTo(XTeamMemberBriefData other)
		{
			bool flag = this.position == XTeamPosition.TP_LEADER;
			int result;
			if (flag)
			{
				result = -1;
			}
			else
			{
				bool flag2 = this.uid == XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
				if (flag2)
				{
					result = -1;
				}
				else
				{
					result = -this.level.CompareTo(other.level);
				}
			}
			return result;
		}
	}
}