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
NPCUtils.cs
Go to the documentation of this file.
1using System;
6
7namespace Terraria.Utilities
8{
9 // Token: 0x020004FD RID: 1277
10 public static class NPCUtils
11 {
12 // Token: 0x060030F1 RID: 12529 RVA: 0x001F7494 File Offset: 0x001F5694
18
19 // Token: 0x060030F2 RID: 12530 RVA: 0x001F74A4 File Offset: 0x001F56A4
26
27 // Token: 0x060030F3 RID: 12531 RVA: 0x001F74BC File Offset: 0x001F56BC
29 {
30 /*
31An exception occurred when decompiling this method (060030F3)
32
33ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Utilities.NPCUtils/TargetSearchResults Terraria.Utilities.NPCUtils::SearchForTarget(Terraria.NPC,Microsoft.Xna.Framework.Vector2,Terraria.Utilities.NPCUtils/TargetSearchFlag,System.Single,System.Int32)
34
35 ---> System.Exception: Basic block has to end with unconditional control flow.
36{
37 IL_0054:
38 stfld:int32(TargetSearchResults::_nearestTankIndex, ldloc:TargetSearchResults[exp:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&](var_0), ldloc:float32[exp:int32](var_13))
39 stfld:TargetType(TargetSearchResults::_nearestTankType, ldloc:TargetSearchResults[exp:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&](var_0), ldloc:int32[exp:TargetType](var_20_41))
40 stloc:int32(var_26_65, ldc.i4:int32(1))
41 stfld:TargetType(TargetSearchResults::_nearestTargetType, ldloc:TargetSearchResults[exp:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&](var_0), ldloc:int32[exp:TargetType](var_26_65))
42 stfld:TargetType(TargetSearchResults::_nearestTargetType, ldloc:TargetSearchResults[exp:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&](var_0), ldloc:int32[exp:TargetType](var_20_41))
43}
44
45 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
46 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
47 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
48 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
49 --- End of inner exception stack trace ---
50 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
51 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
52*/;
53 }
54
55 // Token: 0x060030F4 RID: 12532 RVA: 0x001F7540 File Offset: 0x001F5740
66
67 // Token: 0x060030F5 RID: 12533 RVA: 0x001F7574 File Offset: 0x001F5774
78
79 // Token: 0x060030F6 RID: 12534 RVA: 0x001F75A8 File Offset: 0x001F57A8
89
90 // Token: 0x060030F7 RID: 12535 RVA: 0x001F75E4 File Offset: 0x001F57E4
91 public static void TargetClosestCommon(NPC searcher, bool faceTarget = true, [Optional] Vector2? checkPosition)
92 {
93 searcher.TargetClosest(faceTarget);
94 }
95
96 // Token: 0x060030F8 RID: 12536 RVA: 0x001F75F8 File Offset: 0x001F57F8
108
109 // Token: 0x04003AD7 RID: 15063
110 public const int NPCSearchFilter_OnlyCrystal = 1;
111
112 // Token: 0x04003AD8 RID: 15064
113 public const int NPCSearchFilter_NonBeeNPCs = 2;
114
115 // Token: 0x04003AD9 RID: 15065
116 public const int NPCSearchFilter_DownWind = 3;
117
118 // Token: 0x020004FE RID: 1278
119 public sealed class SearchFilter<T> : MulticastDelegate where T : Entity
120 {
121 // Token: 0x060030F9 RID: 12537 RVA: 0x001F7634 File Offset: 0x001F5834
122 public SearchFilter(object @object, IntPtr method)
123 {
124 }
125
126 // Token: 0x060030FA RID: 12538 RVA: 0x000021DB File Offset: 0x000003DB
127 public bool Invoke(T entity)
128 {
129 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
130 }
131
132 // Token: 0x060030FB RID: 12539 RVA: 0x000021DB File Offset: 0x000003DB
133 public IAsyncResult BeginInvoke(T entity, AsyncCallback callback, object @object)
134 {
135 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
136 }
137
138 // Token: 0x060030FC RID: 12540 RVA: 0x000021DB File Offset: 0x000003DB
139 public bool EndInvoke(IAsyncResult result)
140 {
141 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
142 }
143 }
144
145 // Token: 0x020004FF RID: 1279
147 {
148 // Token: 0x060030FD RID: 12541 RVA: 0x001F7654 File Offset: 0x001F5854
149 public NPCTargetingMethod(object @object, IntPtr method)
150 {
152 this.m_target = @object;
154 this.method_code = this;
155 }
156
157 // Token: 0x060030FE RID: 12542 RVA: 0x001F76B4 File Offset: 0x001F58B4
159 {
162 IntPtr method = this.method;
163 }
164
165 // Token: 0x060030FF RID: 12543 RVA: 0x000021DB File Offset: 0x000003DB
167 {
168 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
169 }
170
171 // Token: 0x06003100 RID: 12544 RVA: 0x001F76D8 File Offset: 0x001F58D8
172 public void EndInvoke(IAsyncResult result)
173 {
174 }
175 }
176
177 // Token: 0x02000500 RID: 1280
178 public static class SearchFilters
179 {
180 // Token: 0x06003101 RID: 12545 RVA: 0x001F76E8 File Offset: 0x001F58E8
181 public static bool OnlyCrystal(NPC npc)
182 {
183 }
184
185 // Token: 0x06003102 RID: 12546 RVA: 0x000021DB File Offset: 0x000003DB
187 {
188 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
189 }
190
191 // Token: 0x06003103 RID: 12547 RVA: 0x001F76F8 File Offset: 0x001F58F8
192 public static bool NonBeeNPCs(NPC npc)
193 {
194 bool flag;
195 return flag;
196 }
197
198 // Token: 0x06003104 RID: 12548 RVA: 0x000021DB File Offset: 0x000003DB
200 {
201 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
202 }
203
204 // Token: 0x02000501 RID: 1281
206 private sealed class <>c__DisplayClass1_0
207 {
208 // Token: 0x06003105 RID: 12549 RVA: 0x00003BB6 File Offset: 0x00001DB6
210 {
211 }
212
213 // Token: 0x06003106 RID: 12550 RVA: 0x001F770C File Offset: 0x001F590C
215 {
216 return default(bool);
217 }
218
219 // Token: 0x04003ADA RID: 15066
220 public Vector2 position;
221
222 // Token: 0x04003ADB RID: 15067
223 public float maxDistance;
224 }
225
226 // Token: 0x02000502 RID: 1282
228 private sealed class <>c__DisplayClass3_0
229 {
230 // Token: 0x06003107 RID: 12551 RVA: 0x00003BB6 File Offset: 0x00001DB6
232 {
233 }
234
235 // Token: 0x06003108 RID: 12552 RVA: 0x001F7724 File Offset: 0x001F5924
236 internal bool <DownwindFromNPC>b__0(Player player)
237 {
238 return default(bool);
239 }
240
241 // Token: 0x04003ADC RID: 15068
242 public NPC npc;
243
244 // Token: 0x04003ADD RID: 15069
245 public float maxDistanceX;
246 }
247 }
248
249 // Token: 0x02000503 RID: 1283
250 public enum TargetType
251 {
252 // Token: 0x04003ADF RID: 15071
253 None,
254 // Token: 0x04003AE0 RID: 15072
255 NPC,
256 // Token: 0x04003AE1 RID: 15073
257 Player,
258 // Token: 0x04003AE2 RID: 15074
259 TankPet
260 }
261
262 // Token: 0x02000504 RID: 1284
264 {
265 // Token: 0x17000616 RID: 1558
266 // (get) Token: 0x06003109 RID: 12553 RVA: 0x001F773C File Offset: 0x001F593C
268 {
269 get
270 {
272 }
273 }
274
275 // Token: 0x17000617 RID: 1559
276 // (get) Token: 0x0600310A RID: 12554 RVA: 0x001F775C File Offset: 0x001F595C
278 {
279 get
280 {
283 return this.NearestTankOwner.Hitbox;
284 }
285 }
286
287 // Token: 0x17000618 RID: 1560
288 // (get) Token: 0x0600310B RID: 12555 RVA: 0x000021DB File Offset: 0x000003DB
290 {
291 get
292 {
293 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
294 }
295 }
296
297 // Token: 0x17000619 RID: 1561
298 // (get) Token: 0x0600310C RID: 12556 RVA: 0x000021DB File Offset: 0x000003DB
299 public bool FoundTarget
300 {
301 get
302 {
303 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
304 }
305 }
306
307 // Token: 0x1700061A RID: 1562
308 // (get) Token: 0x0600310D RID: 12557 RVA: 0x001F7790 File Offset: 0x001F5990
310 {
311 get
312 {
313 /*
314An exception occurred when decompiling this method (0600310D)
315
316ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.NPC Terraria.Utilities.NPCUtils/TargetSearchResults::get_NearestNPC()
317
318 ---> System.Exception: Basic block has to end with unconditional control flow.
319{
320 Block_0:
321 stloc:int32(var_0_06, ldfld:int32(TargetSearchResults::_nearestNPCIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
322 stloc:int32(var_1_0D, ldfld:int32(TargetSearchResults::_nearestNPCIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
323}
324
325 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
326 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
327 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
328 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
329 --- End of inner exception stack trace ---
330 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
331 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
332*/;
333 }
334 }
335
336 // Token: 0x1700061B RID: 1563
337 // (get) Token: 0x0600310E RID: 12558 RVA: 0x001F77AC File Offset: 0x001F59AC
338 public bool FoundNPC
339 {
340 get
341 {
342 /*
343An exception occurred when decompiling this method (0600310E)
344
345ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Utilities.NPCUtils/TargetSearchResults::get_FoundNPC()
346
347 ---> System.Exception: Basic block has to end with unconditional control flow.
348{
349 Block_0:
350 stloc:int32(var_0_06, ldfld:int32(TargetSearchResults::_nearestNPCIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
351}
352
353 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
354 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
355 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
356 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
357 --- End of inner exception stack trace ---
358 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
359 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
360*/;
361 }
362 }
363
364 // Token: 0x1700061C RID: 1564
365 // (get) Token: 0x0600310F RID: 12559 RVA: 0x001F77C0 File Offset: 0x001F59C0
367 {
368 get
369 {
370 return this._nearestNPCIndex;
371 }
372 }
373
374 // Token: 0x1700061D RID: 1565
375 // (get) Token: 0x06003110 RID: 12560 RVA: 0x001F77D4 File Offset: 0x001F59D4
377 {
378 get
379 {
380 /*
381An exception occurred when decompiling this method (06003110)
382
383ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utilities.NPCUtils/TargetSearchResults::get_NearestNPCDistance()
384
385 ---> System.Exception: Basic block has to end with unconditional control flow.
386{
387 Block_0:
388 stloc:float32(var_0_06, ldfld:float32(TargetSearchResults::_nearestNPCDistance, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
389}
390
391 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
392 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
393 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
394 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
395 --- End of inner exception stack trace ---
396 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
397 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
398*/;
399 }
400 }
401
402 // Token: 0x1700061E RID: 1566
403 // (get) Token: 0x06003111 RID: 12561 RVA: 0x001F77E8 File Offset: 0x001F59E8
405 {
406 get
407 {
408 /*
409An exception occurred when decompiling this method (06003111)
410
411ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Player Terraria.Utilities.NPCUtils/TargetSearchResults::get_NearestTankOwner()
412
413 ---> System.Exception: Basic block has to end with unconditional control flow.
414{
415 Block_0:
416 stloc:int32(var_0_06, ldfld:int32(TargetSearchResults::_nearestTankIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
417 stloc:int32(var_1_0D, ldfld:int32(TargetSearchResults::_nearestTankIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
418}
419
420 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
421 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
422 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
423 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
424 --- End of inner exception stack trace ---
425 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
426 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
427*/;
428 }
429 }
430
431 // Token: 0x1700061F RID: 1567
432 // (get) Token: 0x06003112 RID: 12562 RVA: 0x001F7804 File Offset: 0x001F5A04
433 public bool FoundTank
434 {
435 get
436 {
437 /*
438An exception occurred when decompiling this method (06003112)
439
440ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Utilities.NPCUtils/TargetSearchResults::get_FoundTank()
441
442 ---> System.Exception: Basic block has to end with unconditional control flow.
443{
444 Block_0:
445 stloc:int32(var_0_06, ldfld:int32(TargetSearchResults::_nearestTankIndex, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
446}
447
448 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
449 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
450 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
451 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
452 --- End of inner exception stack trace ---
453 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
454 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
455*/;
456 }
457 }
458
459 // Token: 0x17000620 RID: 1568
460 // (get) Token: 0x06003113 RID: 12563 RVA: 0x001F7818 File Offset: 0x001F5A18
462 {
463 get
464 {
465 return this._nearestTankIndex;
466 }
467 }
468
469 // Token: 0x17000621 RID: 1569
470 // (get) Token: 0x06003114 RID: 12564 RVA: 0x001F782C File Offset: 0x001F5A2C
472 {
473 get
474 {
475 /*
476An exception occurred when decompiling this method (06003114)
477
478ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utilities.NPCUtils/TargetSearchResults::get_NearestTankDistance()
479
480 ---> System.Exception: Basic block has to end with unconditional control flow.
481{
482 Block_0:
483 stloc:float32(var_0_06, ldfld:float32(TargetSearchResults::_nearestTankDistance, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
484}
485
486 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
487 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
488 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
489 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
490 --- End of inner exception stack trace ---
491 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
492 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
493*/;
494 }
495 }
496
497 // Token: 0x17000622 RID: 1570
498 // (get) Token: 0x06003115 RID: 12565 RVA: 0x001F7840 File Offset: 0x001F5A40
500 {
501 get
502 {
503 /*
504An exception occurred when decompiling this method (06003115)
505
506ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utilities.NPCUtils/TargetSearchResults::get_AdjustedTankDistance()
507
508 ---> System.Exception: Basic block has to end with unconditional control flow.
509{
510 Block_0:
511 stloc:float32(var_0_06, ldfld:float32(TargetSearchResults::_adjustedTankDistance, ldloc:valuetype Terraria.Utilities.NPCUtils/TargetSearchResults&(this)))
512}
513
514 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
515 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
516 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
517 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
518 --- End of inner exception stack trace ---
519 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
520 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
521*/;
522 }
523 }
524
525 // Token: 0x17000623 RID: 1571
526 // (get) Token: 0x06003116 RID: 12566 RVA: 0x001F7854 File Offset: 0x001F5A54
528 {
529 get
530 {
531 return this._nearestTankType;
532 }
533 }
534
535 // Token: 0x06003117 RID: 12567 RVA: 0x001F7868 File Offset: 0x001F5A68
543
544 // Token: 0x04003AE3 RID: 15075
546
547 // Token: 0x04003AE4 RID: 15076
548 private int _nearestNPCIndex;
549
550 // Token: 0x04003AE5 RID: 15077
551 private float _nearestNPCDistance;
552
553 // Token: 0x04003AE6 RID: 15078
554 private int _nearestTankIndex;
555
556 // Token: 0x04003AE7 RID: 15079
557 private float _nearestTankDistance;
558
559 // Token: 0x04003AE8 RID: 15080
561
562 // Token: 0x04003AE9 RID: 15081
564 }
565
566 // Token: 0x02000505 RID: 1285
567 [Flags]
569 {
570 // Token: 0x04003AEB RID: 15083
571 None = 0,
572 // Token: 0x04003AEC RID: 15084
573 NPCs = 1,
574 // Token: 0x04003AED RID: 15085
575 Players = 2,
576 // Token: 0x04003AEE RID: 15086
577 All = 3
578 }
579 }
580}
class f__AnonymousType0<< Count > j__TPar
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
Rectangle Hitbox
Definition Entity.cs:414
int WhoAmIToTargettingIndex
Definition NPC.cs:224
void Invoke(NPC searcher, bool faceTarget, Vector2? checkPosition)
Definition NPCUtils.cs:158
IAsyncResult BeginInvoke(NPC searcher, bool faceTarget, Vector2? checkPosition, AsyncCallback callback, object @object)
Definition NPCUtils.cs:166
NPCTargetingMethod(object @object, IntPtr method)
Definition NPCUtils.cs:149
SearchFilter(object @object, IntPtr method)
Definition NPCUtils.cs:122
bool EndInvoke(IAsyncResult result)
Definition NPCUtils.cs:139
IAsyncResult BeginInvoke(T entity, AsyncCallback callback, object @object)
Definition NPCUtils.cs:133
static NPCUtils.SearchFilter< Player > OnlyPlayersInCertainDistance(Vector2 position, float maxDistance)
Definition NPCUtils.cs:186
static NPCUtils.SearchFilter< Player > DownwindFromNPC(NPC npc, float maxDistanceX)
Definition NPCUtils.cs:199
static void TargetClosestCommon(NPC searcher, bool faceTarget=true, [Optional] Vector2? checkPosition)
Definition NPCUtils.cs:91
const int NPCSearchFilter_OnlyCrystal
Definition NPCUtils.cs:110
static NPCUtils.TargetSearchResults SearchForTarget(Vector2 position, NPCUtils.TargetSearchFlag flags=NPCUtils.TargetSearchFlag.All, float maxPlayerDistance=-1f, int npcFilter=0)
Definition NPCUtils.cs:13
static void TargetClosestBetsy(NPC searcher, bool faceTarget=true, [Optional] Vector2? checkPosition)
Definition NPCUtils.cs:97
static NPCUtils.TargetSearchResults SearchForTarget(NPC searcher, NPCUtils.TargetSearchFlag flags=NPCUtils.TargetSearchFlag.All, float maxPlayerDistance=-1f, int npcFilter=0)
Definition NPCUtils.cs:20
static NPCUtils.TargetSearchResults SearchForTarget(NPC searcher, Vector2 position, NPCUtils.TargetSearchFlag flags=NPCUtils.TargetSearchFlag.All, float maxPlayerDistance=-1f, int npcFilter=0)
Definition NPCUtils.cs:28
const int NPCSearchFilter_NonBeeNPCs
Definition NPCUtils.cs:113
static void TargetClosestOldOnesInvasion(NPC searcher, bool faceTarget=true, [Optional] Vector2? checkPosition)
Definition NPCUtils.cs:56
static void TargetClosestNonBees(NPC searcher, bool faceTarget=true, [Optional] Vector2? checkPosition)
Definition NPCUtils.cs:68
static void TargetClosestDownwindFromNPC(NPC searcher, float distanceMaxX, bool faceTarget=true, [Optional] Vector2? checkPosition)
Definition NPCUtils.cs:80
const int NPCSearchFilter_DownWind
Definition NPCUtils.cs:116
TargetSearchResults(NPC searcher, int nearestNPCIndex, float nearestNPCDistance, int nearestTankIndex, float nearestTankDistance, float adjustedTankDistance, NPCUtils.TargetType tankType)
Definition NPCUtils.cs:536