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: 0x02000253 RID: 595
|
|
[Token(Token = "0x2000253")]
|
|
public class CSVData
|
|
{
|
|
// Token: 0x170000DB RID: 219
|
|
// (get) Token: 0x06001697 RID: 5783 RVA: 0x00032ED8 File Offset: 0x000310D8
|
|
[Token(Token = "0x170000DB")]
|
|
public string AssetName
|
|
{
|
|
[Token(Token = "0x6001697")]
|
|
[Address(RVA = "0x32FD80", Offset = "0x32ED80", VA = "0x18032FD80")]
|
|
get
|
|
{
|
|
return this.assetName;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06001698 RID: 5784 RVA: 0x00032EEC File Offset: 0x000310EC
|
|
[Token(Token = "0x6001698")]
|
|
[Address(RVA = "0xB8E030", Offset = "0xB8D030", VA = "0x180B8E030")]
|
|
public CSVData(string filePath)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06001698)
|
|
|
|
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: 0x06001699 RID: 5785 RVA: 0x00032F2C File Offset: 0x0003112C
|
|
[Token(Token = "0x6001699")]
|
|
[Address(RVA = "0xB8E000", Offset = "0xB8D000", VA = "0x180B8E000")]
|
|
public CSVData(TextAsset asset)
|
|
{
|
|
this.ConvertData(asset);
|
|
}
|
|
|
|
// Token: 0x0600169A RID: 5786 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600169A")]
|
|
[Address(RVA = "0xB8C650", Offset = "0xB8B650", VA = "0x180B8C650")]
|
|
private void ConvertData(TextAsset asset)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0600169B RID: 5787 RVA: 0x00032F48 File Offset: 0x00031148
|
|
[Token(Token = "0x600169B")]
|
|
[Address(RVA = "0xB8D1A0", Offset = "0xB8C1A0", VA = "0x180B8D1A0")]
|
|
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: 0x0600169C RID: 5788 RVA: 0x00033014 File Offset: 0x00031214
|
|
[Token(Token = "0x600169C")]
|
|
[Address(RVA = "0x36FF60", Offset = "0x36EF60", VA = "0x18036FF60")]
|
|
public bool HasLoadDataCompleted()
|
|
{
|
|
return this.loadDataCompleted;
|
|
}
|
|
|
|
// Token: 0x0600169D RID: 5789 RVA: 0x00033028 File Offset: 0x00031228
|
|
[Token(Token = "0x600169D")]
|
|
[Address(RVA = "0xB8CFF0", Offset = "0xB8BFF0", VA = "0x180B8CFF0")]
|
|
public int GetRowLength()
|
|
{
|
|
return this.data.Length;
|
|
}
|
|
|
|
// Token: 0x0600169E RID: 5790 RVA: 0x00033048 File Offset: 0x00031248
|
|
[Token(Token = "0x600169E")]
|
|
[Address(RVA = "0xB8C9F0", Offset = "0xB8B9F0", VA = "0x180B8C9F0")]
|
|
public int GetColumnLength()
|
|
{
|
|
return this.data[0].Length;
|
|
}
|
|
|
|
// Token: 0x0600169F RID: 5791 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x600169F")]
|
|
[Address(RVA = "0xB8C7A0", Offset = "0xB8B7A0", VA = "0x180B8C7A0")]
|
|
public string[][] CopyData()
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A0 RID: 5792 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A0")]
|
|
[Address(RVA = "0xB8D0E0", Offset = "0xB8C0E0", VA = "0x180B8D0E0")]
|
|
public string GetString(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A1 RID: 5793 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A1")]
|
|
[Address(RVA = "0xB8CE90", Offset = "0xB8BE90", VA = "0x180B8CE90")]
|
|
public int GetInt(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A2 RID: 5794 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A2")]
|
|
[Address(RVA = "0xB8CBB0", Offset = "0xB8BBB0", VA = "0x180B8CBB0")]
|
|
public float GetFloat(int row, int col)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A3 RID: 5795 RVA: 0x0003306C File Offset: 0x0003126C
|
|
[Token(Token = "0x60016A3")]
|
|
[Address(RVA = "0xB8C8E0", Offset = "0xB8B8E0", VA = "0x180B8C8E0")]
|
|
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: 0x060016A4 RID: 5796 RVA: 0x000330B8 File Offset: 0x000312B8
|
|
[Token(Token = "0x60016A4")]
|
|
[Address(RVA = "0xB8D010", Offset = "0xB8C010", VA = "0x180B8D010")]
|
|
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: 0x060016A5 RID: 5797 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A5")]
|
|
[Address(RVA = "0xB8CD80", Offset = "0xB8BD80", VA = "0x180B8CD80")]
|
|
public int GetInt(string propertyName, int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A6 RID: 5798 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A6")]
|
|
[Address(RVA = "0xB8CA30", Offset = "0xB8BA30", VA = "0x180B8CA30")]
|
|
public float GetFloat(string propertyName, int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A7 RID: 5799 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A7")]
|
|
[Address(RVA = "0xB8DE80", Offset = "0xB8CE80", VA = "0x180B8DE80")]
|
|
private bool TryGetValue(string propertyName, int index, out string content)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x060016A8 RID: 5800 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A8")]
|
|
[Address(RVA = "0xB8D440", Offset = "0xB8C440", VA = "0x180B8D440")]
|
|
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: 0x060016A9 RID: 5801 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016A9")]
|
|
[Address(RVA = "0xB8D760", Offset = "0xB8C760", VA = "0x180B8D760")]
|
|
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: 0x060016AA RID: 5802 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x60016AA")]
|
|
[Address(RVA = "0xB8DA20", Offset = "0xB8CA20", VA = "0x180B8DA20")]
|
|
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: 0x040021DE RID: 8670
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40021DE")]
|
|
private string assetName;
|
|
|
|
// Token: 0x040021DF RID: 8671
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40021DF")]
|
|
private string[][] data;
|
|
|
|
// Token: 0x040021E0 RID: 8672
|
|
[Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40021E0")]
|
|
private bool loadDataCompleted;
|
|
}
|