summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XUtliPoolLib/SpriteTable.cs
blob: 84bb5694ab1807b09c5f38f35cb529c746cbf3c7 (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
171
172
173
174
175
176
177
178
179
180
181
182
using System;

namespace XUtliPoolLib
{
	public class SpriteTable : CVSReader
	{
		public SpriteTable.RowData[] Table = null;

		public class RowData
		{
			public uint SpriteID;

			public string SpriteName;

			public uint SpriteQuality;

			public string SpriteIcon;

			public uint SpriteModelID;

			public uint SpriteSkillID;

			public uint AttrID1;

			public uint AttrID2;

			public uint AttrID3;

			public uint AttrID4;

			public uint AttrID5;

			public uint BaseAttr1;

			public uint BaseAttr2;

			public uint BaseAttr3;

			public uint BaseAttr4;

			public uint BaseAttr5;

			public SeqRef<uint> Range1;

			public SeqRef<uint> Range2;

			public SeqRef<uint> Range3;

			public SeqRef<uint> Range4;

			public SeqRef<uint> Range5;

			public uint PresentID;

			public string Color;

			public string DeathAnim;

			public string ReviveAnim;

			public int IllustrationShow;
		}

		public SpriteTable.RowData GetBySpriteID(uint key)
		{
			bool flag = this.Table == null || this.Table.Length == 0;
			SpriteTable.RowData result;
			if (flag)
			{
				result = null;
			}
			else
			{
				for (int i = 0; i < this.Table.Length; i++)
				{
					bool flag2 = this.Table[i].SpriteID == key;
					if (flag2)
					{
						return this.Table[i];
					}
				}
				result = null;
			}
			return result;
		}

		public SpriteTable.RowData GetByPresentID(uint key)
		{
			bool flag = this.Table == null || this.Table.Length == 0;
			SpriteTable.RowData result;
			if (flag)
			{
				result = null;
			}
			else
			{
				for (int i = 0; i < this.Table.Length; i++)
				{
					bool flag2 = this.Table[i].PresentID == key;
					if (flag2)
					{
						return this.Table[i];
					}
				}
				result = null;
			}
			return result;
		}

		protected override void ReadLine(XBinaryReader reader)
		{
			SpriteTable.RowData rowData = new SpriteTable.RowData();
			base.Read<uint>(reader, ref rowData.SpriteID, CVSReader.uintParse);
			this.columnno = 0;
			base.Read<string>(reader, ref rowData.SpriteName, CVSReader.stringParse);
			this.columnno = 1;
			base.Read<uint>(reader, ref rowData.SpriteQuality, CVSReader.uintParse);
			this.columnno = 2;
			base.Read<string>(reader, ref rowData.SpriteIcon, CVSReader.stringParse);
			this.columnno = 3;
			base.Read<uint>(reader, ref rowData.SpriteModelID, CVSReader.uintParse);
			this.columnno = 4;
			base.Read<uint>(reader, ref rowData.SpriteSkillID, CVSReader.uintParse);
			this.columnno = 7;
			base.Read<uint>(reader, ref rowData.AttrID1, CVSReader.uintParse);
			this.columnno = 10;
			base.Read<uint>(reader, ref rowData.AttrID2, CVSReader.uintParse);
			this.columnno = 11;
			base.Read<uint>(reader, ref rowData.AttrID3, CVSReader.uintParse);
			this.columnno = 12;
			base.Read<uint>(reader, ref rowData.AttrID4, CVSReader.uintParse);
			this.columnno = 13;
			base.Read<uint>(reader, ref rowData.AttrID5, CVSReader.uintParse);
			this.columnno = 14;
			base.Read<uint>(reader, ref rowData.BaseAttr1, CVSReader.uintParse);
			this.columnno = 15;
			base.Read<uint>(reader, ref rowData.BaseAttr2, CVSReader.uintParse);
			this.columnno = 16;
			base.Read<uint>(reader, ref rowData.BaseAttr3, CVSReader.uintParse);
			this.columnno = 17;
			base.Read<uint>(reader, ref rowData.BaseAttr4, CVSReader.uintParse);
			this.columnno = 18;
			base.Read<uint>(reader, ref rowData.BaseAttr5, CVSReader.uintParse);
			this.columnno = 19;
			rowData.Range1.Read(reader, this.m_DataHandler);
			this.columnno = 25;
			rowData.Range2.Read(reader, this.m_DataHandler);
			this.columnno = 26;
			rowData.Range3.Read(reader, this.m_DataHandler);
			this.columnno = 27;
			rowData.Range4.Read(reader, this.m_DataHandler);
			this.columnno = 28;
			rowData.Range5.Read(reader, this.m_DataHandler);
			this.columnno = 29;
			base.Read<uint>(reader, ref rowData.PresentID, CVSReader.uintParse);
			this.columnno = 47;
			base.Read<string>(reader, ref rowData.Color, CVSReader.stringParse);
			this.columnno = 48;
			base.Read<string>(reader, ref rowData.DeathAnim, CVSReader.stringParse);
			this.columnno = 49;
			base.Read<string>(reader, ref rowData.ReviveAnim, CVSReader.stringParse);
			this.columnno = 50;
			base.Read<int>(reader, ref rowData.IllustrationShow, CVSReader.intParse);
			this.columnno = 51;
			this.Table[this.lineno] = rowData;
			this.columnno = -1;
		}

		protected override void OnClear(int lineCount)
		{
			bool flag = lineCount > 0;
			if (flag)
			{
				this.Table = new SpriteTable.RowData[lineCount];
			}
			else
			{
				this.Table = null;
			}
		}
	}
}