From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/Team/XTeamMember.cs | 228 +++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Team/XTeamMember.cs (limited to 'Client/Assets/Scripts/XMainClient/Team/XTeamMember.cs') diff --git a/Client/Assets/Scripts/XMainClient/Team/XTeamMember.cs b/Client/Assets/Scripts/XMainClient/Team/XTeamMember.cs new file mode 100644 index 00000000..cda9c7f1 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Team/XTeamMember.cs @@ -0,0 +1,228 @@ +using System; +using System.Collections.Generic; +using KKSG; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XTeamMember : IComparable + { + public ulong uid + { + get + { + return this.briefData.uid; + } + set + { + this.briefData.uid = value; + } + } + + public string name + { + get + { + return this.briefData.name; + } + set + { + this.briefData.name = value; + } + } + + public RoleType profession + { + get + { + return this.briefData.profession; + } + } + + public int level + { + get + { + return this.briefData.level; + } + } + + public uint ppt + { + get + { + return this.briefData.ppt; + } + } + + public XTeamPosition position + { + get + { + return this.briefData.position; + } + set + { + this.briefData.position = value; + } + } + + public ulong guildID + { + get + { + return this.briefData.guildid; + } + set + { + this.briefData.guildid = value; + } + } + + public uint vip + { + get + { + return this.briefData.vip; + } + set + { + this.briefData.vip = value; + } + } + + public uint paymemberid + { + get + { + return this.briefData.paymemberid; + } + set + { + this.briefData.paymemberid = value; + } + } + + public XTeamRelation Relation + { + get + { + return this.briefData.relation; + } + } + + public ulong dragonGuildID + { + get + { + return this.briefData.dragonguildid; + } + } + + public bool bIsLeader + { + get + { + return this.position == XTeamPosition.TP_LEADER; + } + } + + public bool bIsHelper + { + get + { + return this._is_helper; + } + } + + public bool bIsTicket + { + get + { + return this._is_ticket; + } + } + + public bool IsTarja + { + get + { + return this._tarjatime > 0u; + } + } + + public uint ServerID + { + get + { + return this._server_id; + } + } + + private XTeamMemberBriefData briefData = new XTeamMemberBriefData(); + + public ulong entityID; + + public int joinIndex; + + public ExpTeamMemberState state = ExpTeamMemberState.EXPTEAM_IDLE; + + public List fashion = null; + + public OutLook outlook = null; + + public uint sceneID; + + public int leftCount; + + public bool regression = false; + + public bool bIsRobot = false; + + private bool _is_helper = false; + + private bool _is_ticket = false; + + private uint _tarjatime = 0u; + + private uint _server_id = 0u; + + public void SetData(TeamMember data, string leaderName, int joinindex) + { + this.briefData.SetData(data, leaderName); + this.entityID = this.uid; + this.joinIndex = joinindex; + this.state = (ExpTeamMemberState)data.state; + this.fashion = data.fashion; + this.outlook = data.outlook; + this.sceneID = (data.robot ? 1u : data.sceneID); + this.leftCount = (data.robot ? 1 : data.leftcount); + this.briefData.vip = data.vipLevel; + this.bIsRobot = data.robot; + this._is_helper = (data.membertype == TeamMemberType.TMT_HELPER); + this._is_ticket = (data.membertype == TeamMemberType.TMT_USETICKET); + this.briefData.paymemberid = data.paymemberid; + this._tarjatime = data.tarjatime; + this._server_id = data.serverid; + this.regression = data.kingback; + } + + public int CompareTo(XTeamMember other) + { + int num = XFastEnumIntEqualityComparer.ToInt(this.position).CompareTo(XFastEnumIntEqualityComparer.ToInt(other.position)); + bool flag = num == 0; + if (flag) + { + num = this.joinIndex.CompareTo(other.joinIndex); + } + return num; + } + + public static XTeamMember CreateTeamMember(TeamMember data, string leaderName, int joinindex) + { + XTeamMember xteamMember = new XTeamMember(); + xteamMember.SetData(data, leaderName, joinindex); + return xteamMember; + } + } +} -- cgit v1.1-26-g67d0