blob: 413681e3084649c0763730fbe44c91c404e43f36 (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
using System;
using System.Collections.Generic;
using XUtliPoolLib;
namespace XMainClient
{
internal class ArtifactSuit
{
public HashSet<uint> Artifacts
{
get
{
bool flag = this.m_artifacts == null;
if (flag)
{
bool flag2 = ArtifactDocument.ArtifactTab != null;
if (flag2)
{
this.m_artifacts = new HashSet<uint>();
this.GetSuitArtifacts(ref this.m_artifacts);
}
}
return this.m_artifacts;
}
}
public int EffectsNum
{
get
{
bool flag = this.m_effectsNum == -1;
if (flag)
{
this.m_effectsNum = 0;
for (int i = 0; i < this.effects.Length; i++)
{
bool flag2 = this.effects[i].count > 0;
if (flag2)
{
this.m_effectsNum++;
}
}
}
return this.m_effectsNum;
}
}
private HashSet<uint> m_artifacts = null;
public uint Id = 0u;
public uint Level = 0u;
public uint SuitId = 0u;
public uint ElementType = 0u;
public byte SuitQuality = 0;
public bool IsCreateShow = false;
public uint MaxSuitEffectCount = 0u;
public string Name = string.Empty;
public SeqListRef<uint>[] effects = new SeqListRef<uint>[XBagDocument.ArtifactMax + 3];
public HashSet<int> activeCount = new HashSet<int>();
private int m_effectsNum = -1;
private void GetSuitArtifacts(ref HashSet<uint> sets)
{
sets.Clear();
for (int i = 0; i < ArtifactDocument.ArtifactTab.Table.Length; i++)
{
ArtifactListTable.RowData rowData = ArtifactDocument.ArtifactTab.Table[i];
bool flag = rowData == null;
if (!flag)
{
bool flag2 = rowData.ArtifactSuit == this.Id;
if (flag2)
{
sets.Add(rowData.ArtifactID);
}
}
}
}
public int GetEquipedSuitCount(XBodyBag artifactsOnBody)
{
int num = 0;
bool flag = artifactsOnBody.Length != XBagDocument.ArtifactMax;
int result;
if (flag)
{
result = 0;
}
else
{
for (int i = 0; i < XBagDocument.ArtifactMax; i++)
{
XItem xitem = artifactsOnBody[i];
bool flag2 = xitem != null && this.Artifacts != null && this.Artifacts.Contains((uint)xitem.itemID);
if (flag2)
{
num++;
}
}
result = num;
}
return result;
}
public List<int> GetArtifactSuitPos(XBodyBag artifactsOnBody)
{
bool flag = artifactsOnBody.Length != XBagDocument.ArtifactMax;
List<int> result;
if (flag)
{
result = null;
}
else
{
List<int> list = new List<int>();
for (int i = 0; i < XBagDocument.ArtifactMax; i++)
{
XItem xitem = artifactsOnBody[i];
bool flag2 = xitem != null && this.Artifacts != null && this.Artifacts.Contains((uint)xitem.itemID);
if (flag2)
{
list.Add(i);
}
}
result = list;
}
return result;
}
public bool WillChangeEquipedCount(int newItemID, int oldItemID)
{
bool flag = this.Artifacts.Contains((uint)newItemID);
bool flag2 = this.Artifacts.Contains((uint)oldItemID);
return flag ^ flag2;
}
public bool WillChangeEquipedCount(int itemid, XBodyBag equipsOnBody)
{
ArtifactListTable.RowData artifactListRowData = ArtifactDocument.GetArtifactListRowData((uint)itemid);
bool flag = artifactListRowData == null;
bool result;
if (flag)
{
result = false;
}
else
{
XItem xitem = equipsOnBody[(int)artifactListRowData.ArtifactPos];
bool flag2 = xitem == null;
result = (flag2 || this.WillChangeEquipedCount(itemid, xitem.itemID));
}
return result;
}
public bool IsEffectJustActivated(int equipCount)
{
return this.activeCount.Contains(equipCount);
}
}
}
|