terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
WorldFileData.cs
Go to the documentation of this file.
1using System;
4
5namespace Terraria.IO
6{
7 // Token: 0x02000580 RID: 1408
8 public class WorldFileData : FileData
9 {
10 // Token: 0x1700067A RID: 1658
11 // (get) Token: 0x06003451 RID: 13393 RVA: 0x00203048 File Offset: 0x00201248
12 public string SeedText
13 {
14 get
15 {
16 return this._seedText;
17 }
18 }
19
20 // Token: 0x1700067B RID: 1659
21 // (get) Token: 0x06003452 RID: 13394 RVA: 0x0020305C File Offset: 0x0020125C
22 public int Seed
23 {
24 get
25 {
26 return this._seed;
27 }
28 }
29
30 // Token: 0x1700067C RID: 1660
31 // (get) Token: 0x06003453 RID: 13395 RVA: 0x00203070 File Offset: 0x00201270
32 public string WorldSizeName
33 {
34 get
35 {
36 return this._worldSizeName.<Value>k__BackingField;
37 }
38 }
39
40 // Token: 0x1700067D RID: 1661
41 // (get) Token: 0x06003454 RID: 13396 RVA: 0x00203088 File Offset: 0x00201288
42 // (set) Token: 0x06003455 RID: 13397 RVA: 0x0020309C File Offset: 0x0020129C
43 public bool HasCrimson
44 {
45 get
46 {
47 /*
48An exception occurred when decompiling this method (06003454)
49
50ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFileData::get_HasCrimson()
51
52 ---> System.Exception: Basic block has to end with unconditional control flow.
53{
54 Block_0:
55 stloc:bool(var_0_06, ldfld:bool(WorldFileData::HasCorruption, ldloc:WorldFileData(this)))
56}
57
58 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
59 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 355
60 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
61 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
62 --- End of inner exception stack trace ---
63 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
64 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 1683
65*/;
66 }
67 set
68 {
69 }
70 }
71
72 // Token: 0x1700067E RID: 1662
73 // (get) Token: 0x06003456 RID: 13398 RVA: 0x002030AC File Offset: 0x002012AC
74 public bool HasValidSeed
75 {
76 get
77 {
78 /*
79An exception occurred when decompiling this method (06003456)
80
81ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFileData::get_HasValidSeed()
82
83 ---> System.Exception: Basic block has to end with unconditional control flow.
84{
85 Block_0:
86 stloc:uint64(var_0_06, ldfld:uint64(WorldFileData::WorldGeneratorVersion, ldloc:WorldFileData(this)))
87}
88
89 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
90 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 355
91 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
92 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
93 --- End of inner exception stack trace ---
94 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
95 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 1683
96*/;
97 }
98 }
99
100 // Token: 0x1700067F RID: 1663
101 // (get) Token: 0x06003457 RID: 13399 RVA: 0x002030C0 File Offset: 0x002012C0
103 {
104 get
105 {
106 /*
107An exception occurred when decompiling this method (06003457)
108
109ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.IO.WorldFileData::get_UseGuidAsMapName()
110
111 ---> System.Exception: Basic block has to end with unconditional control flow.
112{
113 Block_0:
114 stloc:uint64(var_0_06, ldfld:uint64(WorldFileData::WorldGeneratorVersion, ldloc:WorldFileData(this)))
115}
116
117 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
118 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 355
119 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
120 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
121 --- End of inner exception stack trace ---
122 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
123 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 1683
124*/;
125 }
126 }
127
128 // Token: 0x06003458 RID: 13400 RVA: 0x002030D4 File Offset: 0x002012D4
129 public string GetWorldName(bool allowCropping = false)
130 {
131 return this.Name;
132 }
133
134 // Token: 0x06003459 RID: 13401 RVA: 0x002030E8 File Offset: 0x002012E8
135 public string GetFullSeedText(bool allowCropping = false)
136 {
137 int worldSizeX = this.WorldSizeX;
138 int worldSizeY = this.WorldSizeY;
139 return "{0}.{1}.{2}.{3}";
140 }
141
142 // Token: 0x0600345A RID: 13402 RVA: 0x00203164 File Offset: 0x00201364
144 : base("World")
145 {
146 }
147
148 // Token: 0x0600345B RID: 13403 RVA: 0x00203198 File Offset: 0x00201398
149 public WorldFileData(string path, bool cloudSave)
150 {
151 LocalizedText text = Language.GetText("UI.WorldSizeUnknown");
153 }
154
155 // Token: 0x0600345C RID: 13404 RVA: 0x002031D0 File Offset: 0x002013D0
156 public override void SetAsActive()
157 {
158 if (!true)
159 {
160 }
161 }
162
163 // Token: 0x0600345D RID: 13405 RVA: 0x002031E0 File Offset: 0x002013E0
171
172 // Token: 0x0600345E RID: 13406 RVA: 0x00203204 File Offset: 0x00201404
173 public static WorldFileData FromInvalidWorld(string path, bool cloudSave)
174 {
175 /*
176An exception occurred when decompiling this method (0600345E)
177
178ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.IO.WorldFileData Terraria.IO.WorldFileData::FromInvalidWorld(System.String,System.Boolean)
179
180 ---> System.Exception: Basic block has to end with unconditional control flow.
181{
182 IL_000A:
183 stloc:DateTime(var_3_11, callgetter:DateTime(DateTime::get_Now))
184}
185
186 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
187 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 355
188 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
189 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
190 --- End of inner exception stack trace ---
191 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
192 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 1683
193*/;
194 }
195
196 // Token: 0x0600345F RID: 13407 RVA: 0x00203224 File Offset: 0x00201424
197 public void SetSeedToEmpty()
198 {
199 this.SetSeed("");
200 }
201
202 // Token: 0x06003460 RID: 13408 RVA: 0x0020323C File Offset: 0x0020143C
203 public void SetSeed(string seedText)
204 {
205 int num = 1;
207 if (num == 0)
208 {
209 }
210 }
211
212 // Token: 0x06003461 RID: 13409 RVA: 0x00203260 File Offset: 0x00201460
213 public void SetSeedToRandom()
214 {
215 int num;
216 string text = num.ToString();
217 this.SetSeed(text);
218 }
219
220 // Token: 0x06003462 RID: 13410 RVA: 0x0020327C File Offset: 0x0020147C
221 public override void MoveToCloud()
222 {
223 bool isCloudSave = this._isCloudSave;
224 if (!isCloudSave)
225 {
226 string name = this.Name;
227 if (!isCloudSave)
228 {
229 }
231 bool flag = FileUtilities.MoveToCloud(this._path, worldPathFromName);
233 localFavoriteData.ClearEntry(this);
234 this._isCloudSave = true;
236 localFavoriteData.SaveFavorite(this);
237 return;
238 }
239 }
240
241 // Token: 0x06003463 RID: 13411 RVA: 0x002032DC File Offset: 0x002014DC
242 public override void MoveToLocal()
243 {
244 bool isCloudSave = this._isCloudSave;
245 if (isCloudSave)
246 {
247 string name = this.Name;
248 if (!isCloudSave)
249 {
250 }
251 long num = 0L;
253 bool flag = FileUtilities.MoveToLocal(this._path, worldPathFromName);
255 Main.LocalFavoriteData.SaveFavorite(this);
256 return;
257 }
258 }
259
260 // Token: 0x04004131 RID: 16689
262
263 // Token: 0x04004132 RID: 16690
264 public int _glitchFrame;
265
266 // Token: 0x04004133 RID: 16691
268
269 // Token: 0x04004134 RID: 16692
270 private const ulong GUID_IN_WORLD_FILE_VERSION = 777389080577UL;
271
272 // Token: 0x04004135 RID: 16693
273 public bool CurrentSaveFormat;
274
275 // Token: 0x04004136 RID: 16694
277
278 // Token: 0x04004137 RID: 16695
279 public int WorldSizeX;
280
281 // Token: 0x04004138 RID: 16696
282 public int WorldSizeY;
283
284 // Token: 0x04004139 RID: 16697
286
287 // Token: 0x0400413A RID: 16698
288 private string _seedText = "";
289
290 // Token: 0x0400413B RID: 16699
291 private int _seed;
292
293 // Token: 0x0400413C RID: 16700
294 public bool IsValid = true;
295
296 // Token: 0x0400413D RID: 16701
298
299 // Token: 0x0400413E RID: 16702
301
302 // Token: 0x0400413F RID: 16703
303 public int GameMode;
304
305 // Token: 0x04004140 RID: 16704
306 public bool DrunkWorld;
307
308 // Token: 0x04004141 RID: 16705
309 public bool NotTheBees;
310
311 // Token: 0x04004142 RID: 16706
312 public bool ForTheWorthy;
313
314 // Token: 0x04004143 RID: 16707
315 public bool Anniversary;
316
317 // Token: 0x04004144 RID: 16708
318 public bool DontStarve;
319
320 // Token: 0x04004145 RID: 16709
321 public bool RemixWorld;
322
323 // Token: 0x04004146 RID: 16710
324 public bool NoTrapsWorld;
325
326 // Token: 0x04004147 RID: 16711
327 public bool ZenithWorld;
328
329 // Token: 0x04004148 RID: 16712
330 public bool HasCorruption = true;
331
332 // Token: 0x04004149 RID: 16713
333 public bool IsHardMode;
334
335 // Token: 0x0400414A RID: 16714
336 public bool DefeatedMoonlord;
337 }
338}
class f__AnonymousType0<< Count > j__TPar
string GetWorldName(bool allowCropping=false)
override void SetAsActive()
void SetWorldSize(int x, int y)
override void MoveToCloud()
void SetSeed(string seedText)
string GetFullSeedText(bool allowCropping=false)
WorldFileData(string path, bool cloudSave)
static WorldFileData FromInvalidWorld(string path, bool cloudSave)
const ulong GUID_IN_WORLD_FILE_VERSION
override void MoveToLocal()
static LocalizedText GetText(string key)
Definition Language.cs:44
static string GetWorldPathFromName(string worldName, bool cloudSave)
Definition Main.cs:6327
static FavoritesFile LocalFavoriteData
Definition Main.cs:337
static bool MoveToCloud(string localPath, string cloudPath)
static bool MoveToLocal(string cloudPath, string localPath)