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
GolfState.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x02000A0A RID: 2570
7 public class GolfState
8 {
9 // Token: 0x06004BD2 RID: 19410 RVA: 0x002703CC File Offset: 0x0026E5CC
10 private void UpdateScoreTime()
11 {
12 int num = this.golfScoreTime;
13 int num2 = this.golfScoreDelay;
15 }
16
17 // Token: 0x06004BD3 RID: 19411 RVA: 0x002703F0 File Offset: 0x0026E5F0
18 public void ResetScoreTime()
19 {
20 }
21
22 // Token: 0x06004BD4 RID: 19412 RVA: 0x00270400 File Offset: 0x0026E600
23 public void SetScoreTime()
24 {
25 int num = this.golfScoreTimeMax;
27 }
28
29 // Token: 0x1700086D RID: 2157
30 // (get) Token: 0x06004BD5 RID: 19413 RVA: 0x0027041C File Offset: 0x0026E61C
31 public float ScoreAdjustment
32 {
33 get
34 {
35 /*
36An exception occurred when decompiling this method (06004BD5)
37
38ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Golf.GolfState::get_ScoreAdjustment()
39
40 ---> System.Exception: Basic block has to end with unconditional control flow.
41{
42 Block_0:
43 stloc:int32(var_0_06, ldfld:int32(GolfState::golfScoreTime, ldloc:GolfState(this)))
44 stloc:int32(var_1_0D, ldfld:int32(GolfState::golfScoreTimeMax, ldloc:GolfState(this)))
45}
46
47 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
48 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
49 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
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 88
51 --- End of inner exception stack trace ---
52 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
53 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
54*/;
55 }
56 }
57
58 // Token: 0x1700086E RID: 2158
59 // (get) Token: 0x06004BD6 RID: 19414 RVA: 0x00270438 File Offset: 0x0026E638
60 public bool ShouldScoreHole
61 {
62 get
63 {
64 /*
65An exception occurred when decompiling this method (06004BD6)
66
67ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Golf.GolfState::get_ShouldScoreHole()
68
69 ---> System.Exception: Basic block has to end with unconditional control flow.
70{
71 Block_0:
72 stloc:int32(var_0_06, ldfld:int32(GolfState::golfScoreTime, ldloc:GolfState(this)))
73 stloc:int32(var_1_0D, ldfld:int32(GolfState::golfScoreDelay, ldloc:GolfState(this)))
74}
75
76 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
77 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
78 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
79 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
80 --- End of inner exception stack trace ---
81 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
82 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
83*/;
84 }
85 }
86
87 // Token: 0x1700086F RID: 2159
88 // (get) Token: 0x06004BD7 RID: 19415 RVA: 0x00270454 File Offset: 0x0026E654
89 public bool IsTrackingBall
90 {
91 get
92 {
93 /*
94An exception occurred when decompiling this method (06004BD7)
95
96ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Golf.GolfState::get_IsTrackingBall()
97
98 ---> System.Exception: Basic block has to end with unconditional control flow.
99{
100 Block_0:
101 stloc:bool(var_0_0E, ldfld:bool(GolfState::_waitingForBallToSettle, ldloc:GolfState(this)))
102}
103
104 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
105 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
106 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
107 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
108 --- End of inner exception stack trace ---
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 92
110 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
111*/;
112 }
113 }
114
115 // Token: 0x17000870 RID: 2160
116 // (get) Token: 0x06004BD8 RID: 19416 RVA: 0x00270470 File Offset: 0x0026E670
118 {
119 get
120 {
121 /*
122An exception occurred when decompiling this method (06004BD8)
123
124ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Golf.GolfState::get_ShouldCameraTrackBallLastKnownLocation()
125
126 ---> System.Exception: Basic block has to end with unconditional control flow.
127{
128 IL_000A:
129 stloc:Projectile(var_3_12, call:Projectile(GolfState::GetLastHitBall, ldloc:GolfState(this)))
130}
131
132 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
133 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
134 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
135 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
136 --- End of inner exception stack trace ---
137 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
138 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
139*/;
140 }
141 }
142
143 // Token: 0x06004BD9 RID: 19417 RVA: 0x00270490 File Offset: 0x0026E690
145 {
146 return this._lastRecordedBallLocation;
147 }
148
149 // Token: 0x06004BDA RID: 19418 RVA: 0x002704A4 File Offset: 0x0026E6A4
150 public void WorldClear()
151 {
152 }
153
154 // Token: 0x06004BDB RID: 19419 RVA: 0x002704B4 File Offset: 0x0026E6B4
155 public void CancelBallTracking()
156 {
157 }
158
159 // Token: 0x06004BDC RID: 19420 RVA: 0x002704C4 File Offset: 0x0026E6C4
161 {
162 Vector2 position = golfBall.position;
163 this._lastSwingPosition = position;
165 int num = 1;
170 float x = golfBall.position.X;
171 float y = golfBall.position.Y;
172 }
173
174 // Token: 0x06004BDD RID: 19421 RVA: 0x00270528 File Offset: 0x0026E728
176 {
177 return golfBall.whoAmI;
178 }
179
180 // Token: 0x06004BDE RID: 19422 RVA: 0x0027053C File Offset: 0x0026E73C
182 {
184 if (lastHitGolfBall == null)
185 {
186 return;
187 }
188 bool active = lastHitGolfBall.active;
189 if (!active)
190 {
191 return;
192 }
194 if (!active)
195 {
197 }
198 if (active)
199 {
200 int owner = lastHitGolfBall2.owner;
201 int myPlayer = Main.myPlayer;
204 return this._lastHitGolfBall;
205 }
206 }
207
208 // Token: 0x06004BDF RID: 19423 RVA: 0x002705A4 File Offset: 0x0026E7A4
209 public void Update()
210 {
211 int num = this.golfScoreTime;
212 int num2 = this.golfScoreDelay;
213 this.golfScoreTime = num;
214 if (this.GetLastHitBall() != null)
215 {
216 int num3;
218 {
219 num3 = 32640;
221 }
222 if (num3 == 0)
223 {
224 }
225 int type = Main.LocalPlayer.HeldItem.type;
226 if (num2 == 0)
227 {
228 }
229 Item heldItem = Main.LocalPlayer.HeldItem;
230 if (num2 == 0)
231 {
232 }
233 bool flag = Item.IsAGolfingItem(heldItem);
234 }
235 }
236
237 // Token: 0x06004BE0 RID: 19424 RVA: 0x00270620 File Offset: 0x0026E820
239 {
242 if (waitingForBallToSettle)
243 {
244 Vector2 center = golfBall.Center;
246 {
247 }
248 double num;
250 }
251 }
252
253 // Token: 0x06004BE1 RID: 19425 RVA: 0x00270650 File Offset: 0x0026E850
255 {
257 if (this != null)
258 {
259 float x = golfBall.position.X;
260 float y = golfBall.position.Y;
261 return;
262 }
263 }
264
265 // Token: 0x06004BE2 RID: 19426 RVA: 0x00270680 File Offset: 0x0026E880
267 {
268 /*
269An exception occurred when decompiling this method (06004BE2)
270
271ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.Golf.GolfState::GetGolfBallScore(Terraria.Projectile)
272
273 ---> System.Exception: Basic block has to end with unconditional control flow.
274{
275 Block_0:
276 stloc:int32(var_1_10, ldfld:int32(GolfState::golfScoreTime, ldloc:GolfState(this)))
277 stloc:int32(var_2_17, ldfld:int32(GolfState::golfScoreTimeMax, ldloc:GolfState(this)))
278}
279
280 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
281 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
282 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
283 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
284 --- End of inner exception stack trace ---
285 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
286 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
287*/;
288 }
289
290 // Token: 0x06004BE3 RID: 19427 RVA: 0x002706A4 File Offset: 0x0026E8A4
291 public void ResetGolfBall()
292 {
293 int num = 1;
295 if (lastHitBall != null)
296 {
297 float x = lastHitBall.position.X;
298 float y = lastHitBall.position.Y;
299 float x2 = this._lastSwingPosition.X;
300 float y2 = this._lastSwingPosition.Y;
301 if (num == 0)
302 {
303 }
306 if (lastSwingPosition == null)
307 {
308 }
309 if (!true)
310 {
311 }
312 int num2 = 1;
314 int num3 = 32768;
316 }
317 }
318
319 // Token: 0x06004BE4 RID: 19428 RVA: 0x00270730 File Offset: 0x0026E930
320 public GolfState()
321 {
322 }
323
324 // Token: 0x0400860C RID: 34316
325 private const int BALL_RETURN_PENALTY = 1;
326
327 // Token: 0x0400860D RID: 34317
328 private int golfScoreTime;
329
330 // Token: 0x0400860E RID: 34318
331 private int golfScoreTimeMax;
332
333 // Token: 0x0400860F RID: 34319
334 private int golfScoreDelay;
335
336 // Token: 0x04008610 RID: 34320
337 private double _lastRecordedBallTime;
338
339 // Token: 0x04008611 RID: 34321
341
342 // Token: 0x04008612 RID: 34322
344
345 // Token: 0x04008613 RID: 34323
347
348 // Token: 0x04008614 RID: 34324
350
351 // Token: 0x04008615 RID: 34325
353
354 // Token: 0x04008616 RID: 34326
356 }
357}
class f__AnonymousType0<< Count > j__TPar
GolfBallTrackRecord[] _hitRecords
Definition GolfState.cs:355
void RecordSwing(Projectile golfBall)
Definition GolfState.cs:160
void RecordBallInfo(Projectile golfBall)
Definition GolfState.cs:238
void LandBall(Projectile golfBall)
Definition GolfState.cs:254
int GetGolfBallId(Projectile golfBall)
Definition GolfState.cs:175
int GetGolfBallScore(Projectile golfBall)
Definition GolfState.cs:266
static bool IsAGolfingItem(Item item)
Definition Item.cs:681
static int myPlayer
Definition Main.cs:2337
static Player LocalPlayer
Definition Main.cs:5267