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
TileSmartInteractCandidateProvider.cs
Go to the documentation of this file.
1using System;
6
8{
9 // Token: 0x0200084A RID: 2122
11 {
12 // Token: 0x0600431F RID: 17183 RVA: 0x0024D6D4 File Offset: 0x0024B8D4
30
31 // Token: 0x06004320 RID: 17184 RVA: 0x000021DB File Offset: 0x000003DB
32 private int JoinValue(int x, int y)
33 {
34 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
35 }
36
37 // Token: 0x06004321 RID: 17185 RVA: 0x0024D74C File Offset: 0x0024B94C
38 private void SplitValue(int value, [Out] int x, [Out] int y)
39 {
40 }
41
42 // Token: 0x06004322 RID: 17186 RVA: 0x0024D75C File Offset: 0x0024B95C
44 {
45 /*
46An exception occurred when decompiling this method (06004322)
47
48ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider::ProvideCandidate(Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings,Terraria.GameContent.ObjectInteractions.ISmartInteractCandidate)
49
50 ---> System.Exception: Basic block has to end with unconditional control flow.
51{
52 IL_0187:
53 stloc:float32(var_55_192, ldfld:float32(Vector2::X, ldfld:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](SmartInteractScanSettings::mousevec, ldloc:SmartInteractScanSettings[exp:valuetype Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings&](settings))))
54 stloc:float32(var_56_19F, ldfld:float32(Vector2::Y, ldfld:Vector2[exp:valuetype Microsoft.Xna.Framework.Vector2&](SmartInteractScanSettings::mousevec, ldloc:SmartInteractScanSettings[exp:valuetype Terraria.GameContent.ObjectInteractions.SmartInteractScanSettings&](settings))))
55 stloc:ReusableCandidate(var_59_1AA, ldfld:ReusableCandidate(TileSmartInteractCandidateProvider::_candidate, ldloc:TileSmartInteractCandidateProvider(this)))
56 stfld:int32(ReusableCandidate::_aimedX, ldloc:ReusableCandidate(var_59_1AA), ldloc:int32(var_47_154))
57 stloc:ReusableCandidate(var_61_1BE, ldfld:ReusableCandidate(TileSmartInteractCandidateProvider::_candidate, ldloc:TileSmartInteractCandidateProvider(this)))
58 stloc:int32(var_62_1C1, ldc.i4:int32(1))
59 stfld:bool(ReusableCandidate::_strictSettings, ldloc:ReusableCandidate(var_61_1BE), ldloc:int32[exp:bool](var_62_1C1))
60 stfld:int32(ReusableCandidate::_aimedX, ldloc:ReusableCandidate(var_61_1BE), ldc.i4:int32(42168472))
61}
62
63 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
64 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
65 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
66 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
67 --- End of inner exception stack trace ---
68 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
69 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
70*/;
71 }
72
73 // Token: 0x06004323 RID: 17187 RVA: 0x000021DB File Offset: 0x000003DB
75 {
76 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
77 }
78
79 // Token: 0x06004324 RID: 17188 RVA: 0x0024D940 File Offset: 0x0024BB40
83
84 // Token: 0x0400814E RID: 33102
86
87 // Token: 0x0400814F RID: 33103
89
90 // Token: 0x0200084B RID: 2123
92 {
93 // Token: 0x06004325 RID: 17189 RVA: 0x0024D954 File Offset: 0x0024BB54
94 public void Reuse(bool strictSettings, float distanceFromCursor, int AimedX, int AimedY, int LX, int LY, int HX, int HY)
95 {
98 this._lx = LX;
99 this.<DistanceFromCursor>k__BackingField = (float)LY;
100 this._hx = HX;
101 this._lx = HY;
102 }
103
104 // Token: 0x170007C7 RID: 1991
105 // (get) Token: 0x06004326 RID: 17190 RVA: 0x0024D990 File Offset: 0x0024BB90
106 // (set) Token: 0x06004327 RID: 17191 RVA: 0x0024D9A4 File Offset: 0x0024BBA4
108 {
110 get
111 {
112 /*
113An exception occurred when decompiling this method (06004326)
114
115ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.ObjectInteractions.TileSmartInteractCandidateProvider/ReusableCandidate::get_DistanceFromCursor()
116
117 ---> System.Exception: Basic block has to end with unconditional control flow.
118{
119 Block_0:
120 stloc:float32(var_0_06, ldfld:float32(ReusableCandidate::<DistanceFromCursor>k__BackingField, ldloc:ReusableCandidate(this)))
121}
122
123 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
124 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
125 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
126 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
127 --- End of inner exception stack trace ---
128 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
129 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
130*/;
131 }
133 private set
134 {
135 }
136 }
137
138 // Token: 0x06004328 RID: 17192 RVA: 0x0024D9B4 File Offset: 0x0024BBB4
139 public void WinCandidacy()
140 {
141 int num = 1;
142 int aimedX = this._aimedX;
143 if (num == 0)
144 {
145 }
149 if (num != 0 && strictSettings)
150 {
152 return;
153 }
155 int lx = this._lx;
156 if (num == 0)
157 {
158 }
159 Main.TileInteractionLX = int.MinValue;
160 int ly = this._ly;
161 Main.TileInteractionLY = int.MinValue;
162 int hx = this._hx;
163 Main.TileInteractionHX = int.MinValue;
164 int hy = this._hy;
165 Main.TileInteractionHY = int.MinValue;
166 }
167
168 // Token: 0x06004329 RID: 17193 RVA: 0x0024DA48 File Offset: 0x0024BC48
170 {
171 }
172
173 // Token: 0x04008150 RID: 33104
174 private bool _strictSettings;
175
176 // Token: 0x04008151 RID: 33105
177 private int _aimedX;
178
179 // Token: 0x04008152 RID: 33106
180 private int _aimedY;
181
182 // Token: 0x04008153 RID: 33107
183 private int _hx;
184
185 // Token: 0x04008154 RID: 33108
186 private int _hy;
187
188 // Token: 0x04008155 RID: 33109
189 private int _lx;
190
191 // Token: 0x04008156 RID: 33110
192 private int _ly;
193
194 // Token: 0x04008157 RID: 33111
196 private float <DistanceFromCursor>k__BackingField;
197 }
198 }
199}
class f__AnonymousType0<< Count > j__TPar
void Reuse(bool strictSettings, float distanceFromCursor, int AimedX, int AimedY, int LX, int LY, int HX, int HY)
bool ProvideCandidate(SmartInteractScanSettings settings, [Out] ISmartInteractCandidate candidate)
static Dictionary< int, bool > SmartInteractTileCoordsSelected
Definition Main.cs:3077
static Dictionary< int, bool > SmartInteractTileCoords
Definition Main.cs:3063