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
WorldGenRange.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x020004ED RID: 1261
9 public class WorldGenRange
10 {
11 // Token: 0x1700060A RID: 1546
12 // (get) Token: 0x0600308E RID: 12430 RVA: 0x001F68D4 File Offset: 0x001F4AD4
13 public int ScaledMinimum
14 {
15 get
16 {
17 int minimum = this.Minimum;
18 return this.ScaleValue(minimum);
19 }
20 }
21
22 // Token: 0x1700060B RID: 1547
23 // (get) Token: 0x0600308F RID: 12431 RVA: 0x001F68F0 File Offset: 0x001F4AF0
24 public int ScaledMaximum
25 {
26 get
27 {
28 int maximum = this.Maximum;
29 return this.ScaleValue(maximum);
30 }
31 }
32
33 // Token: 0x06003090 RID: 12432 RVA: 0x001F690C File Offset: 0x001F4B0C
39
40 // Token: 0x06003091 RID: 12433 RVA: 0x001F6930 File Offset: 0x001F4B30
41 public int GetRandom(UnifiedRandom random)
42 {
43 int minimum = this.Minimum;
44 int num = this.ScaleValue(minimum);
45 int maximum = this.Maximum;
46 int num2 = this.ScaleValue(maximum);
47 int num3;
48 return num3;
49 }
50
51 // Token: 0x06003092 RID: 12434 RVA: 0x001F6960 File Offset: 0x001F4B60
52 private int ScaleValue(int value)
53 {
54 /*
55An exception occurred when decompiling this method (06003092)
56
57ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.WorldBuilding.WorldGenRange::ScaleValue(System.Int32)
58
59 ---> System.Exception: Basic block has to end with unconditional control flow.
60{
61 IL_000A:
62 brtrue(IL_0000, ldloc:ScalingMode[exp:bool](var_0_06))
63}
64
65 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
66 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
67 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
68 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
69 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
70 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
71 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
72 --- End of inner exception stack trace ---
73 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
74 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
75*/;
76 }
77
78 // Token: 0x06003093 RID: 12435 RVA: 0x001F697C File Offset: 0x001F4B7C
79 // Note: this type is marked as 'beforefieldinit'.
81 {
82 }
83
84 // Token: 0x04003A9C RID: 15004
86
87 // Token: 0x04003A9D RID: 15005
88 [JsonProperty("Min")]
89 public readonly int Minimum;
90
91 // Token: 0x04003A9E RID: 15006
92 [JsonProperty("Max")]
93 public readonly int Maximum;
94
95 // Token: 0x04003A9F RID: 15007
97 [JsonProperty]
99
100 // Token: 0x020004EE RID: 1262
101 public enum ScalingMode
102 {
103 // Token: 0x04003AA1 RID: 15009
104 None,
105 // Token: 0x04003AA2 RID: 15010
106 WorldArea,
107 // Token: 0x04003AA3 RID: 15011
109 }
110 }
111}
class f__AnonymousType0<< Count > j__TPar
WorldGenRange(int minimum, int maximum)
readonly WorldGenRange.ScalingMode ScaleWith
int GetRandom(UnifiedRandom random)
static readonly WorldGenRange Empty