255 lines
11 KiB
C#
255 lines
11 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text.RegularExpressions;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200021A RID: 538
|
|
[Token(Token = "0x200021A")]
|
|
public class CSVData
|
|
{
|
|
// Token: 0x170000CB RID: 203
|
|
// (get) Token: 0x060014EB RID: 5355 RVA: 0x0002F928 File Offset: 0x0002DB28
|
|
[Token(Token = "0x170000CB")]
|
|
public string AssetName
|
|
{
|
|
[Token(Token = "0x60014EB")]
|
|
[Address(RVA = "0x345100", Offset = "0x343900", VA = "0x180345100")]
|
|
get
|
|
{
|
|
return this.assetName;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060014EC RID: 5356 RVA: 0x0002F93C File Offset: 0x0002DB3C
|
|
[Token(Token = "0x60014EC")]
|
|
[Address(RVA = "0x13D6320", Offset = "0x13D4B20", VA = "0x1813D6320")]
|
|
public CSVData(string filePath)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060014EC)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void CSVData::.ctor(System.String)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{; IL_21:; stloc:Exception(var_2_31, newobj:Exception(Exception::.ctor, call:string(string::Concat, ldstr:string("Load CSV failed: "), ldloc:string(filePath)))); };
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1810
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1836
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1804
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 344
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1618
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x060014ED RID: 5357 RVA: 0x0002F97C File Offset: 0x0002DB7C
|
|
[Token(Token = "0x60014ED")]
|
|
[Address(RVA = "0x13D62F0", Offset = "0x13D4AF0", VA = "0x1813D62F0")]
|
|
public CSVData(TextAsset asset)
|
|
{
|
|
this.ConvertData(asset);
|
|
}
|
|
|
|
// Token: 0x060014EE RID: 5358 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014EE")]
|
|
[Address(RVA = "0x13D4940", Offset = "0x13D3140", VA = "0x1813D4940")]
|
|
private void ConvertData(TextAsset asset)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014EF RID: 5359 RVA: 0x0002F998 File Offset: 0x0002DB98
|
|
[Token(Token = "0x60014EF")]
|
|
[Address(RVA = "0x13D5490", Offset = "0x13D3C90", VA = "0x1813D5490")]
|
|
private List<string[]> GetTempList(string input)
|
|
{
|
|
string[] array;
|
|
do
|
|
{
|
|
array = new string[1];
|
|
}
|
|
while ("\r\n" != 0 && array == 0);
|
|
array[0] = "\r\n";
|
|
int num = 0;
|
|
string[] array2 = input.Split(array, (StringSplitOptions)num);
|
|
List<string[]> list = new List();
|
|
Regex regex = new Regex("\"");
|
|
int num2 = 0;
|
|
int length = array2.Length;
|
|
if (num2 < length)
|
|
{
|
|
string text = array2[num2];
|
|
string text2 = "" + text;
|
|
MatchCollection matchCollection = regex.Matches(text2);
|
|
int num3 = matchCollection.Count;
|
|
if (matchCollection < 0)
|
|
{
|
|
num3++;
|
|
}
|
|
if (num3 == 0)
|
|
{
|
|
char[] array3 = new char[num3 + 1];
|
|
array3[0] = ';';
|
|
string[] array4 = text2.Split(array3);
|
|
list.Add(array4);
|
|
}
|
|
num2++;
|
|
}
|
|
return list;
|
|
}
|
|
|
|
// Token: 0x060014F0 RID: 5360 RVA: 0x0002FA64 File Offset: 0x0002DC64
|
|
[Token(Token = "0x60014F0")]
|
|
[Address(RVA = "0x4FFC50", Offset = "0x4FE450", VA = "0x1804FFC50")]
|
|
public bool HasLoadDataCompleted()
|
|
{
|
|
return this.loadDataCompleted;
|
|
}
|
|
|
|
// Token: 0x060014F1 RID: 5361 RVA: 0x0002FA78 File Offset: 0x0002DC78
|
|
[Token(Token = "0x60014F1")]
|
|
[Address(RVA = "0x13D52E0", Offset = "0x13D3AE0", VA = "0x1813D52E0")]
|
|
public int GetRowLength()
|
|
{
|
|
return this.data.Length;
|
|
}
|
|
|
|
// Token: 0x060014F2 RID: 5362 RVA: 0x0002FA98 File Offset: 0x0002DC98
|
|
[Token(Token = "0x60014F2")]
|
|
[Address(RVA = "0x13D4CE0", Offset = "0x13D34E0", VA = "0x1813D4CE0")]
|
|
public int GetColumnLength()
|
|
{
|
|
return this.data[0].Length;
|
|
}
|
|
|
|
// Token: 0x060014F3 RID: 5363 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014F3")]
|
|
[Address(RVA = "0x13D4A90", Offset = "0x13D3290", VA = "0x1813D4A90")]
|
|
public string[][] CopyData()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014F4 RID: 5364 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014F4")]
|
|
[Address(RVA = "0x13D53D0", Offset = "0x13D3BD0", VA = "0x1813D53D0")]
|
|
public string GetString(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014F5 RID: 5365 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014F5")]
|
|
[Address(RVA = "0x13D5180", Offset = "0x13D3980", VA = "0x1813D5180")]
|
|
public int GetInt(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014F6 RID: 5366 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014F6")]
|
|
[Address(RVA = "0x13D4EA0", Offset = "0x13D36A0", VA = "0x1813D4EA0")]
|
|
public float GetFloat(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014F7 RID: 5367 RVA: 0x0002FABC File Offset: 0x0002DCBC
|
|
[Token(Token = "0x60014F7")]
|
|
[Address(RVA = "0x13D4BD0", Offset = "0x13D33D0", VA = "0x1813D4BD0")]
|
|
public bool GetBoolean(int row, int col)
|
|
{
|
|
string text = this.data[row][col];
|
|
bool flag = text != "";
|
|
if (!flag)
|
|
{
|
|
return flag;
|
|
}
|
|
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
|
|
return int.Parse(text, invariantCulture) > 0;
|
|
}
|
|
|
|
// Token: 0x060014F8 RID: 5368 RVA: 0x0002FB08 File Offset: 0x0002DD08
|
|
[Token(Token = "0x60014F8")]
|
|
[Address(RVA = "0x13D5300", Offset = "0x13D3B00", VA = "0x1813D5300")]
|
|
public string GetString(string propertyName, int index)
|
|
{
|
|
int num = 0;
|
|
if (this.TryGetValue(propertyName, index, num))
|
|
{
|
|
}
|
|
string text;
|
|
this.LogError("GetString", propertyName, index, num, text);
|
|
return "Error";
|
|
}
|
|
|
|
// Token: 0x060014F9 RID: 5369 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014F9")]
|
|
[Address(RVA = "0x13D5070", Offset = "0x13D3870", VA = "0x1813D5070")]
|
|
public int GetInt(string propertyName, int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014FA RID: 5370 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014FA")]
|
|
[Address(RVA = "0x13D4D20", Offset = "0x13D3520", VA = "0x1813D4D20")]
|
|
public float GetFloat(string propertyName, int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014FB RID: 5371 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014FB")]
|
|
[Address(RVA = "0x13D6170", Offset = "0x13D4970", VA = "0x1813D6170")]
|
|
private bool TryGetValue(string propertyName, int index, out string content)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014FC RID: 5372 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014FC")]
|
|
[Address(RVA = "0x13D5730", Offset = "0x13D3F30", VA = "0x1813D5730")]
|
|
private void LogError(string functionName, int row, int column, string content, object value)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014FD RID: 5373 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014FD")]
|
|
[Address(RVA = "0x13D5A50", Offset = "0x13D4250", VA = "0x1813D5A50")]
|
|
private void LogError(string functionName, int row, int column, Exception exception)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060014FE RID: 5374 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60014FE")]
|
|
[Address(RVA = "0x13D5D10", Offset = "0x13D4510", VA = "0x1813D5D10")]
|
|
private void LogError(string functionName, string propertyName, int index, [Optional] string content, string value = "")
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0400202A RID: 8234
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400202A")]
|
|
private string assetName;
|
|
|
|
// Token: 0x0400202B RID: 8235
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400202B")]
|
|
private string[][] data;
|
|
|
|
// Token: 0x0400202C RID: 8236
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400202C")]
|
|
private bool loadDataCompleted;
|
|
}
|