Elin Modding Docs Doc
Loading...
Searching...
No Matches
SourceChara.cs
1using System;
2using System.Collections.Generic;
3
4// Token: 0x02000015 RID: 21
5public class SourceChara : SourceDataString<SourceChara.Row>
6{
7 // Token: 0x060000ED RID: 237 RVA: 0x00009C54 File Offset: 0x00007E54
8 public override SourceChara.Row CreateRow()
9 {
10 return new SourceChara.Row
11 {
12 id = SourceData.GetString(0),
13 _id = SourceData.GetInt(1),
14 name_JP = SourceData.GetString(2),
15 name = SourceData.GetString(3),
16 aka_JP = SourceData.GetString(4),
17 aka = SourceData.GetString(5),
18 idActor = SourceData.GetStringArray(6),
19 sort = SourceData.GetInt(7),
20 size = SourceData.GetIntArray(8),
21 _idRenderData = SourceData.GetString(9),
22 tiles = SourceData.GetIntArray(10),
23 tiles_snow = SourceData.GetIntArray(11),
24 colorMod = SourceData.GetInt(12),
25 components = SourceData.GetStringArray(13),
26 defMat = SourceData.GetString(14),
27 LV = SourceData.GetInt(15),
28 chance = SourceData.GetInt(16),
29 quality = SourceData.GetInt(17),
30 hostility = SourceData.GetString(18),
31 biome = SourceData.GetString(19),
32 tag = SourceData.GetStringArray(20),
33 trait = SourceData.GetStringArray(21),
34 race = SourceData.GetString(22),
35 job = SourceData.GetString(23),
36 tactics = SourceData.GetString(24),
37 aiIdle = SourceData.GetString(25),
38 aiParam = SourceData.GetIntArray(26),
39 actCombat = SourceData.GetStringArray(27),
40 mainElement = SourceData.GetStringArray(28),
41 elements = Core.ParseElements(SourceData.GetStr(29, false)),
42 equip = SourceData.GetString(30),
43 loot = SourceData.GetStringArray(31),
44 category = SourceData.GetString(32),
45 filter = SourceData.GetStringArray(33),
46 gachaFilter = SourceData.GetStringArray(34),
47 tone = SourceData.GetString(35),
48 actIdle = SourceData.GetStringArray(36),
49 lightData = SourceData.GetString(37),
50 idExtra = SourceData.GetString(38),
51 bio = SourceData.GetString(39),
52 faith = SourceData.GetString(40),
53 works = SourceData.GetStringArray(41),
54 hobbies = SourceData.GetStringArray(42),
55 idText = SourceData.GetString(43),
56 moveAnime = SourceData.GetString(44),
57 factory = SourceData.GetStringArray(45),
58 components = SourceData.GetStringArray(46),
59 detail_JP = SourceData.GetString(47),
60 detail = SourceData.GetString(48)
61 };
62 }
63
64 // Token: 0x060000EE RID: 238 RVA: 0x00009EE0 File Offset: 0x000080E0
65 public override void SetRow(SourceChara.Row r)
66 {
67 this.map[r.id] = r;
68 }
69
70 // Token: 0x060000EF RID: 239 RVA: 0x00009EF4 File Offset: 0x000080F4
71 public override void BackupPref()
72 {
73 this._rows.Clear();
74 foreach (SourceChara.Row row in this.rows)
75 {
76 this._rows[row.id] = row;
77 }
78 }
79
80 // Token: 0x060000F0 RID: 240 RVA: 0x00009F60 File Offset: 0x00008160
81 public override void RestorePref()
82 {
83 foreach (SourceChara.Row row in this.rows)
84 {
85 RenderRow renderRow = row;
86 SourceChara.Row row2 = this._rows.TryGetValue(row.id, null);
87 renderRow.pref = (((row2 != null) ? row2.pref : null) ?? new SourcePref());
88 }
89 }
90
91 // Token: 0x060000F1 RID: 241 RVA: 0x00009FDC File Offset: 0x000081DC
92 public override void ValidatePref()
93 {
94 foreach (SourceChara.Row row in this.rows)
95 {
96 row.pref.Validate();
97 }
98 }
99
100 // Token: 0x17000032 RID: 50
101 // (get) Token: 0x060000F2 RID: 242 RVA: 0x0000A034 File Offset: 0x00008234
102 public override string[] ImportFields
103 {
104 get
105 {
106 return new string[]
107 {
108 "aka"
109 };
110 }
111 }
112
113 // Token: 0x040000D3 RID: 211
114 public Dictionary<string, SourceChara.Row> _rows = new Dictionary<string, SourceChara.Row>();
115
116 // Token: 0x040000D4 RID: 212
117 public static SourceChara.Row rowDefaultPCC;
118
119 // Token: 0x02000796 RID: 1942
120 [Serializable]
121 public class Row : CardRow
122 {
123 // Token: 0x170010CB RID: 4299
124 // (get) Token: 0x0600371B RID: 14107 RVA: 0x0012A398 File Offset: 0x00128598
125 public override bool UseAlias
126 {
127 get
128 {
129 return false;
130 }
131 }
132
133 // Token: 0x170010CC RID: 4300
134 // (get) Token: 0x0600371C RID: 14108 RVA: 0x0012A39B File Offset: 0x0012859B
135 public override string GetAlias
136 {
137 get
138 {
139 return "n";
140 }
141 }
142
143 // Token: 0x170010CD RID: 4301
144 // (get) Token: 0x0600371D RID: 14109 RVA: 0x0012A3A4 File Offset: 0x001285A4
145 public SourceRace.Row race_row
146 {
147 get
148 {
149 SourceRace.Row result;
150 if ((result = this._race_row) == null)
151 {
152 result = (this._race_row = base.sources.races.map[this.race]);
153 }
154 return result;
155 }
156 }
157
158 // Token: 0x170010CE RID: 4302
159 // (get) Token: 0x0600371E RID: 14110 RVA: 0x0012A3DF File Offset: 0x001285DF
160 public override string RecipeID
161 {
162 get
163 {
164 return this.id;
165 }
166 }
167
168 // Token: 0x0600371F RID: 14111 RVA: 0x0012A3E8 File Offset: 0x001285E8
169 public override string GetSearchName(bool jp)
170 {
171 string result;
172 if (!jp)
173 {
174 if ((result = this._nameSearch) == null)
175 {
176 return this._nameSearch = (this.name.StartsWith("*") ? this.aka : this.name).ToLower();
177 }
178 }
179 else if ((result = this._nameSearchJP) == null)
180 {
181 result = (this._nameSearchJP = (this.name_JP.StartsWith("*") ? base.GetText("aka", false) : base.GetText("name", false)).ToLower());
182 }
183 return result;
184 }
185
186 // Token: 0x06003720 RID: 14112 RVA: 0x0012A478 File Offset: 0x00128678
187 public override void SetTiles()
188 {
189 base.SetTiles();
190 this.staticSkin = base.HasTag(CTAG.staticSkin);
191 if (!this.renderData || !this.renderData.pass)
192 {
193 return;
194 }
195 if (this._tiles_snow == null || this._tiles_snow.Length != this.tiles_snow.Length)
196 {
197 this._tiles_snow = new int[this.tiles_snow.Length];
198 for (int i = 0; i < this.tiles_snow.Length; i++)
199 {
200 this._tiles_snow[i] = this.tiles_snow[i] / 100 * (int)this.renderData.pass.pmesh.tiling.x + this.tiles_snow[i] % 100;
201 }
202 }
203 }
204
205 // Token: 0x06003721 RID: 14113 RVA: 0x0012A534 File Offset: 0x00128734
206 public override string GetName()
207 {
208 string text = base.GetText("name", false);
209 text = text.Replace("#ele4", "").Replace("#ele3", "").Replace("#ele2", "").Replace("#ele", "");
210 if (text == "*r")
211 {
212 text = base.GetText("aka", false);
213 }
214 if (text[0] == ' ')
215 {
216 text = text.TrimStart(' ');
217 }
218 return text;
219 }
220
221 // Token: 0x04001F28 RID: 7976
222 public int _id;
223
224 // Token: 0x04001F29 RID: 7977
225 public string aka_JP;
226
227 // Token: 0x04001F2A RID: 7978
228 public string aka;
229
230 // Token: 0x04001F2B RID: 7979
231 public int[] tiles_snow;
232
233 // Token: 0x04001F2C RID: 7980
234 public string hostility;
235
236 // Token: 0x04001F2D RID: 7981
237 public string biome;
238
239 // Token: 0x04001F2E RID: 7982
240 public string race;
241
242 // Token: 0x04001F2F RID: 7983
243 public string job;
244
245 // Token: 0x04001F30 RID: 7984
246 public string tactics;
247
248 // Token: 0x04001F31 RID: 7985
249 public string aiIdle;
250
251 // Token: 0x04001F32 RID: 7986
252 public int[] aiParam;
253
254 // Token: 0x04001F33 RID: 7987
255 public string[] actCombat;
256
257 // Token: 0x04001F34 RID: 7988
258 public string[] mainElement;
259
260 // Token: 0x04001F35 RID: 7989
261 public string equip;
262
263 // Token: 0x04001F36 RID: 7990
264 public string[] gachaFilter;
265
266 // Token: 0x04001F37 RID: 7991
267 public string tone;
268
269 // Token: 0x04001F38 RID: 7992
270 public string[] actIdle;
271
272 // Token: 0x04001F39 RID: 7993
273 public string bio;
274
275 // Token: 0x04001F3A RID: 7994
276 public string faith;
277
278 // Token: 0x04001F3B RID: 7995
279 public string[] works;
280
281 // Token: 0x04001F3C RID: 7996
282 public string[] hobbies;
283
284 // Token: 0x04001F3D RID: 7997
285 public string idText;
286
287 // Token: 0x04001F3E RID: 7998
288 public string moveAnime;
289
290 // Token: 0x04001F3F RID: 7999
291 public bool staticSkin;
292
293 // Token: 0x04001F40 RID: 8000
294 public int[] _tiles_snow;
295
296 // Token: 0x04001F41 RID: 8001
297 [NonSerialized]
298 public SourceRace.Row _race_row;
299
300 // Token: 0x04001F42 RID: 8002
301 public string name_L;
302
303 // Token: 0x04001F43 RID: 8003
304 public string detail_L;
305
306 // Token: 0x04001F44 RID: 8004
307 public string aka_L;
308 }
309}