From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Team/XTeamMemberBriefData.cs | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs (limited to 'Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs') diff --git a/Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs b/Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs new file mode 100644 index 00000000..83ed9275 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Team/XTeamMemberBriefData.cs @@ -0,0 +1,95 @@ +using System; +using KKSG; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XTeamMemberBriefData : XDataBase, IComparable + { + 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.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.singleton.XPlayerData.RoleID; + if (flag2) + { + result = -1; + } + else + { + result = -this.level.CompareTo(other.level); + } + } + return result; + } + } +} -- cgit v1.1-26-g67d0