summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XSystemRewardData.cs
blob: 8e8cf7e696a1ba1f36ecdfc4e0b4b1e4afda14a3 (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
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;
		}
	}
}