summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs
blob: 86371196a5a1b77de677d1c01bb7569426caba35 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using XUtliPoolLib;

namespace XMainClient
{
	internal class ArtifactSingleData : IComparable
	{
		public int CompareValue
		{
			get
			{
				bool flag = this.ItemComposeData == null;
				int result;
				if (flag)
				{
					result = int.MinValue;
				}
				else
				{
					int num = (int)XBagDocument.BagDoc.GetItemCount(this.ItemComposeData.SrcItem1[0]) - this.ItemComposeData.SrcItem1[1];
					bool flag2 = num < 0;
					if (flag2)
					{
						result = num;
					}
					else
					{
						int num2 = (int)XBagDocument.BagDoc.GetItemCount(this.ItemComposeData.SrcItem2[0]) - this.ItemComposeData.SrcItem2[1];
						bool flag3 = num2 < 0;
						if (flag3)
						{
							result = num2;
						}
						else
						{
							int num3 = (int)XBagDocument.BagDoc.GetItemCount(this.ItemComposeData.SrcItem3[0]) - this.ItemComposeData.SrcItem3[1];
							bool flag4 = num3 < 0;
							if (flag4)
							{
								result = num3;
							}
							else
							{
								int num4 = (int)XBagDocument.BagDoc.GetItemCount(XEquipCreateDocument.CoinId) - this.ItemComposeData.Coin;
								bool flag5 = num4 < 0;
								if (flag5)
								{
									result = num4;
								}
								else
								{
									result = num + num2 + num3 + num4;
								}
							}
						}
					}
				}
				return result;
			}
		}

		public bool Redpoint = false;

		public ArtifactListTable.RowData ItemData = null;

		public ItemComposeTable.RowData ItemComposeData = null;

		public int CompareTo(object _other)
		{
			ArtifactSingleData artifactSingleData = _other as ArtifactSingleData;
			bool flag = this.ItemComposeData != null && artifactSingleData.ItemComposeData != null;
			if (flag)
			{
				bool flag2 = this.ItemComposeData.Level != artifactSingleData.ItemComposeData.Level;
				if (flag2)
				{
					return this.ItemComposeData.Level - artifactSingleData.ItemComposeData.Level;
				}
			}
			bool flag3 = this.CompareValue >= artifactSingleData.CompareValue;
			int result;
			if (flag3)
			{
				result = 1;
			}
			else
			{
				result = -1;
			}
			return result;
		}
	}
}