From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/XSystemRewardData.cs | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XSystemRewardData.cs (limited to 'Client/Assets/Scripts/XMainClient/XSystemRewardData.cs') diff --git a/Client/Assets/Scripts/XMainClient/XSystemRewardData.cs b/Client/Assets/Scripts/XMainClient/XSystemRewardData.cs new file mode 100644 index 00000000..8e8cf7e6 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XSystemRewardData.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using KKSG; + +namespace XMainClient +{ + internal class XSystemRewardData : IComparable + { + public XSystemRewardState state + { + get + { + return this._state; + } + } + + public ulong uid; + + public List itemList = new List(); + + public uint type; + + public string[] param; + + public string serverName = ""; + + public string serverContent = ""; + + public uint sortType; + + private XSystemRewardState _state; + + public void SetState(uint s) + { + switch (s) + { + case 0u: + this._state = XSystemRewardState.SRS_CANNOT_FETCH; + break; + case 1u: + this._state = XSystemRewardState.SRS_CAN_FETCH; + break; + case 2u: + this._state = XSystemRewardState.SRS_FETCHED; + break; + default: + this._state = XSystemRewardState.SRS_CANNOT_FETCH; + break; + } + } + + public int CompareTo(XSystemRewardData other) + { + int num = this.state.CompareTo(other.state); + bool flag = num != 0; + int result; + if (flag) + { + result = num; + } + else + { + result = this.sortType.CompareTo(other.sortType); + } + return result; + } + } +} -- cgit v1.1-26-g67d0