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
TETrainingDummy.cs
Go to the documentation of this file.
1using System;
3using System.IO;
8
10{
11 // Token: 0x02000818 RID: 2072
13 {
14 // Token: 0x06004279 RID: 17017 RVA: 0x0024B540 File Offset: 0x00249740
15 public override void RegisterTileEntityID(int assignedID)
16 {
17 if (!true)
18 {
19 }
20 if (!true)
21 {
22 }
23 }
24
25 // Token: 0x0600427A RID: 17018 RVA: 0x0024B558 File Offset: 0x00249758
26 public override void NetPlaceEntityAttempt(int x, int y)
27 {
28 if (!true)
29 {
30 }
32 }
33
34 // Token: 0x0600427B RID: 17019 RVA: 0x0024B570 File Offset: 0x00249770
35 public static void NetPlaceEntity(int x, int y)
36 {
37 if (!true)
38 {
39 }
40 int num = TETrainingDummy.Place(x, y);
41 }
42
43 // Token: 0x0600427C RID: 17020 RVA: 0x000021DB File Offset: 0x000003DB
44 public override TileEntity GenerateInstance()
45 {
46 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
47 }
48
49 // Token: 0x0600427D RID: 17021 RVA: 0x0024B588 File Offset: 0x00249788
50 public override bool IsTileValidForEntity(int x, int y)
51 {
52 if (!true)
53 {
54 }
55 return TETrainingDummy.ValidTile(x, y);
56 }
57
58 // Token: 0x0600427E RID: 17022 RVA: 0x0024B5A0 File Offset: 0x002497A0
59 public static void ClearBoxes()
60 {
61 if (!true)
62 {
63 }
64 }
65
66 // Token: 0x0600427F RID: 17023 RVA: 0x0024B5B0 File Offset: 0x002497B0
67 public override void Update()
68 {
69 int num = this.npc;
70 int num2 = this.npc;
71 this.Deactivate();
72 }
73
74 // Token: 0x06004280 RID: 17024 RVA: 0x0024B610 File Offset: 0x00249810
75 private static void FillPlayerHitboxes()
76 {
77 int num = 1;
78 if (num == 0)
79 {
80 }
81 if (num == 0)
82 {
83 if (num == 0)
84 {
85 }
86 if (num == 0 || num != 0)
87 {
88 }
89 }
90 }
91
92 // Token: 0x06004281 RID: 17025 RVA: 0x0024B630 File Offset: 0x00249830
93 public static bool ValidTile(int x, int y)
94 {
95 /*
96An exception occurred when decompiling this method (06004281)
97
98ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Tile_Entities.TETrainingDummy::ValidTile(System.Int32,System.Int32)
99
100 ---> System.Exception: Basic block has to end with unconditional control flow.
101{
102 IL_0032:
103 stloc:int16(var_12_39, callgetter:int16(Tile::get_frameX, ldloc:Tile[exp:valuetype Terraria.Tile&](var_11)))
104}
105
106 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
107 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
108 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
109 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
110 --- End of inner exception stack trace ---
111 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
112 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
113*/;
114 }
115
116 // Token: 0x06004282 RID: 17026 RVA: 0x0024B678 File Offset: 0x00249878
118 {
119 if (!true)
120 {
121 }
122 base..ctor();
123 this.npc = 1;
124 }
125
126 // Token: 0x06004283 RID: 17027 RVA: 0x0024B698 File Offset: 0x00249898
127 public static int Place(int x, int y)
128 {
129 if (!true)
130 {
131 }
132 int num = TileEntity.AssignNewID();
133 if (!true)
134 {
135 }
136 Monitor.Enter(x, x != 0);
137 long num2 = 0L;
138 Monitor.Exit(x);
139 if (num2 == 0L)
140 {
141 return x;
142 }
143 throw new OutOfMemoryException();
144 }
145
146 // Token: 0x06004284 RID: 17028 RVA: 0x0024B6E8 File Offset: 0x002498E8
147 public static int Hook_AfterPlacement(int x, int y, int type = 378, int style = 0, int direction = 1, int alternate = 0)
148 {
149 int num = 1;
150 if (num == 0)
151 {
152 }
154 if (num == 0)
155 {
156 }
157 int myPlayer = Main.myPlayer;
158 return 87;
159 }
160
161 // Token: 0x06004285 RID: 17029 RVA: 0x0024B730 File Offset: 0x00249930
162 public static void Kill(int x, int y)
163 {
164 if (!true)
165 {
166 }
167 int key = TileEntity.GetKey(x, y);
168 if (!true)
169 {
170 }
171 if (!true)
172 {
173 }
174 int key2 = TileEntity.GetKey(x, y);
175 if (x == 0)
176 {
177 return;
178 }
179 throw new OutOfMemoryException();
180 }
181
182 // Token: 0x06004286 RID: 17030 RVA: 0x0024B778 File Offset: 0x00249978
183 public static int Find(int x, int y)
184 {
185 /*
186An exception occurred when decompiling this method (06004286)
187
188ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.Tile_Entities.TETrainingDummy::Find(System.Int32,System.Int32)
189
190 ---> System.Exception: Basic block has to end with unconditional control flow.
191{
192 IL_0003:
193 stloc:int32(var_0_0E, call:int32(TileEntity::GetKey, ldc.i4:int32(-2147483648), ldloc:int32(x)))
194}
195
196 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
197 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
198 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
199 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
200 --- End of inner exception stack trace ---
201 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
202 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
203*/;
204 }
205
206 // Token: 0x06004287 RID: 17031 RVA: 0x0024B794 File Offset: 0x00249994
207 public override void WriteExtraData(BinaryWriter writer, bool networkSend)
208 {
209 int num = this.npc;
210 }
211
212 // Token: 0x06004288 RID: 17032 RVA: 0x0024B7A8 File Offset: 0x002499A8
213 public override void ReadExtraData(BinaryReader reader, bool networkSend)
214 {
215 this.npc = reader;
216 }
217
218 // Token: 0x06004289 RID: 17033 RVA: 0x0024B7BC File Offset: 0x002499BC
219 public void Activate()
220 {
221 if (!true)
222 {
223 }
224 int num;
225 this.npc = num;
226 bool netHost = Main.NetHost;
227 int id = this.ID;
228 Point16 position = this.Position;
229 short y = this.Position.Y;
230 }
231
232 // Token: 0x0600428A RID: 17034 RVA: 0x0024B7FC File Offset: 0x002499FC
233 public void Deactivate()
234 {
235 int num = this.npc;
236 int num2 = this.npc;
237 this.npc = num2;
238 if (num2 == 0)
239 {
240 }
241 bool netHost = Main.NetHost;
242 int id = this.ID;
243 Point16 position = this.Position;
244 short y = this.Position.Y;
245 }
246
247 // Token: 0x0600428B RID: 17035 RVA: 0x0024B84C File Offset: 0x00249A4C
248 public override string ToString()
249 {
250 Point16 position = this.Position;
251 string text;
252 if ((text == null || text != null) && ("x " == null || "x " != null))
253 {
254 short y = this.Position.Y;
255 string text2;
256 string text3;
257 if ((text2 == null || text2 != null) && ("y npc: " == null || "y npc: " != null) && (text3 == null || text3 != null))
258 {
259 string text4;
260 return text4;
261 }
262 }
263 throw new ArrayTypeMismatchException();
264 }
265
266 // Token: 0x0600428C RID: 17036 RVA: 0x0024B8A8 File Offset: 0x00249AA8
267 // Note: this type is marked as 'beforefieldinit'.
269 {
270 }
271
272 // Token: 0x040080E8 RID: 33000
274
275 // Token: 0x040080E9 RID: 33001
276 private static bool playerBoxFilled;
277
278 // Token: 0x040080EA RID: 33002
279 private static byte _myEntityID;
280
281 // Token: 0x040080EB RID: 33003
282 public int npc;
283 }
284}
class f__AnonymousType0<< Count > j__TPar
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static int GetKey(int x, int y)
override void WriteExtraData(BinaryWriter writer, bool networkSend)
static int Hook_AfterPlacement(int x, int y, int type=378, int style=0, int direction=1, int alternate=0)
override void ReadExtraData(BinaryReader reader, bool networkSend)
static Dictionary< int, Rectangle > playerBox
static bool NetHost
Definition Main.cs:5544
static int myPlayer
Definition Main.cs:2337
static bool NetClientOnly
Definition Main.cs:5407