summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XSystemRewardData.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XSystemRewardData.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XSystemRewardData.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XSystemRewardData.cs68
1 files changed, 68 insertions, 0 deletions
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<XSystemRewardData>
+ {
+ public XSystemRewardState state
+ {
+ get
+ {
+ return this._state;
+ }
+ }
+
+ public ulong uid;
+
+ public List<ItemBrief> itemList = new List<ItemBrief>();
+
+ 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;
+ }
+ }
+}