191 {
194 {
195 dictionary[row2.id] = row2;
196 }
198 foreach (Row row3 in rows)
199 {
202 string key;
203 foreach (KeyValuePair<string, System.Reflection.FieldInfo>
item in rowFields)
204 {
205 item.Deconstruct(out key, out var value);
206 string text = key;
207 System.Reflection.FieldInfo fieldInfo = value;
208 if (!(text == "parse"))
209 {
210 fieldInfo.SetValue(row, fieldInfo.GetValue(obj));
211 }
212 }
213 row.id = row3.id;
214 row._origin = row3._origin;
215 if (row3.LV != 0)
216 {
217 row.LV = row3.LV;
218 }
219 if (row3.chance != -1)
220 {
221 row.chance = row3.chance;
222 }
223 if (row3.value != -1)
224 {
225 row.value = row3.value;
226 }
227 else
228 {
230 }
231 if (row3.weight != -1)
232 {
233 row.weight = row3.weight;
234 }
235 if (!row3.tiles.IsEmpty())
236 {
237 row.tiles = row3.tiles;
238 }
239 if (!row3.skins.IsEmpty())
240 {
241 row.skins = row3.skins;
242 }
243 if (!row3.name.IsEmpty())
244 {
245 row.name = row3.name;
246 }
247 if (!row3.name_JP.IsEmpty())
248 {
249 row.name_JP = row3.name_JP;
250 }
251 if (!row3.detail.IsEmpty())
252 {
253 row.detail = row3.detail;
254 }
255 if (!row3.detail_JP.IsEmpty())
256 {
257 row.detail_JP = row3.detail_JP;
258 }
259 if (!row3.unit.IsEmpty())
260 {
261 row.unit = row3.unit;
262 }
263 if (!row3.unit_JP.IsEmpty())
264 {
265 row.unit_JP = row3.unit_JP;
266 }
267 if (!row3.vals.IsEmpty())
268 {
269 row.vals = row3.vals;
270 }
271 if (!row3.components.IsEmpty())
272 {
273 row.components = row3.components;
274 }
275 if (!row3.defMat.IsEmpty())
276 {
277 row.defMat = row3.defMat;
278 }
279 if (!row3.trait.IsEmpty())
280 {
281 row.trait = row3.trait;
282 }
283 if (!row3.category.IsEmpty())
284 {
285 row.category = row3.category;
286 }
287 if (!row3.factory.IsEmpty())
288 {
289 row.factory = row3.factory;
290 }
291 if (!row3.tag.IsEmpty())
292 {
293 row.tag = row3.tag;
294 }
295 row.recipeKey = row3.recipeKey;
296 if (!row3.parse.IsEmpty())
297 {
298 string[] parse = row3.parse;
299 for (int i = 0; i < parse.Length; i++)
300 {
301 string[] array = parse[i].Split('/');
302 key = array[0];
303 switch (key)
304 {
305 case "elec":
306 row.electricity = array[1].ToInt();
307 break;
308 case "render":
309 row._idRenderData = array[1];
310 break;
311 case "tiletype":
312 row._tileType = array[1];
313 break;
314 case "anime":
315 row.anime = ((array.Length <= 4) ? ((array.Length <= 3) ? new int[2]
316 {
317 array[1].ToInt(),
318 array[2].ToInt()
319 } : new int[3]
320 {
321 array[1].ToInt(),
322 array[2].ToInt(),
323 array[3].ToInt()
324 }) : new int[4]
325 {
326 array[1].ToInt(),
327 array[2].ToInt(),
328 array[3].ToInt(),
329 array[4].ToInt()
330 });
331 break;
332 case "colortype":
333 row.colorType = ((array[1] == "none") ? "" : array[1]);
334 break;
335 case "skin":
336 {
337 string[] array3 = array[1].Split('|');
338 row.skins = new int[array3.Length];
339 for (int k = 0; k < array3.Length; k++)
340 {
341 row.
skins[k] = array3[k].ToInt();
342 }
343 break;
344 }
345 case "alt":
346 {
347 string[] array2 = array[1].Split('|');
348 row.altTiles = new int[array2.Length];
349 for (int j = 0; j < array2.Length; j++)
350 {
351 row.
altTiles[j] = array2[j].ToInt();
352 }
353 row.ignoreAltFix = true;
354 break;
355 }
356 case "naming":
357 row.naming = array[1];
358 break;
359 case "ex":
360 row.idActorEx = array[1];
361 break;
362 case "extra":
363 row.idExtra = array[1];
364 break;
365 case "noWindowLight":
366 row.idExtra = "";
367 row.altTiles = (row._altTiles = new int[0]);
368 break;
369 case "sound":
370 row.idSound = array[1];
371 break;
372 case "color":
373 row.colorMod = 100;
374 break;
375 case "no_color":
376 row.colorMod = 0;
377 break;
378 case "unique":
379 row.quality = 4;
380 break;
381 case "ele":
382 {
383 int[] second = new int[2]
384 {
386 array[2].ToInt()
387 };
388 row.elements = row.
elements.Concat(second).ToArray();
389 break;
390 }
391 }
392 }
393 }
397 }
398 rows.Clear();
399 }
static SourceManager sources
Dictionary< string, FieldInfo > GetRowFields()
virtual void OnImportRow(Row _r, SourceThing.Row c)
override void OnImportData(SourceData data)