diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs b/Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs new file mode 100644 index 00000000..86371196 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/ArtifactSingleData.cs @@ -0,0 +1,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;
+ }
+ }
+}
|