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
GUICoins.cs
Go to the documentation of this file.
1using System;
4using Terraria;
5using Terraria.UI;
6using UnityEngine;
7
8// Token: 0x0200012D RID: 301
9public class GUICoins
10{
11 // Token: 0x060007DA RID: 2010 RVA: 0x0001EC4C File Offset: 0x0001CE4C
12 public GUICoins()
13 {
14 }
15
16 // Token: 0x060007DB RID: 2011 RVA: 0x0001EC70 File Offset: 0x0001CE70
28
29 // Token: 0x060007DC RID: 2012 RVA: 0x0001EC98 File Offset: 0x0001CE98
30 public float ItemScale(int index)
31 {
32 /*
33An exception occurred when decompiling this method (060007DC)
34
35ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUICoins::ItemScale(System.Int32)
36
37 ---> System.Exception: Basic block has to end with unconditional control flow.
38{
39 Block_0:
40 stloc:bool(var_1_07, callgetter:bool(RightSideHUDAnchorUpdator::get_UseCollpasedCoinsAmmo))
41 stloc:!0(var_2_0D, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
42}
43
44 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
45 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
46 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
47 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
48 --- End of inner exception stack trace ---
49 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
50 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
51*/;
52 }
53
54 // Token: 0x060007DD RID: 2013 RVA: 0x0001ECB4 File Offset: 0x0001CEB4
55 public void ItemOver(int index)
56 {
57 int myPlayer = Main.myPlayer;
63 global::Cursor cursor;
64 if (cursor != null)
65 {
66 return;
67 }
68 long num = 0L;
69 global::Cursor cursor2;
70 if (cursor2 != null)
71 {
72 return;
73 }
75 if (this.rightClickHeld)
76 {
77 int num2 = this.lastItemClicked;
78 int num3 = this.lastItemClicked;
79 if (num3 == 0)
80 {
81 }
82 bool mouseLeft = Main.mouseLeft;
83 int type;
84 if (num3 != 0)
85 {
86 if (num3 == 0)
87 {
88 }
89 if (Main.mouseItem != null)
90 {
91 if (num3 == 0)
92 {
93 }
94 type = Main.mouseItem.type;
95 if (type != 0)
96 {
97 }
98 }
99 }
100 if (type == 0)
101 {
102 }
104 int myPlayer7 = Main.myPlayer;
105 bool mouseRight = Main.mouseRight;
106 int myPlayer8 = Main.myPlayer;
107 return;
108 }
109 if (num == 0L)
110 {
111 float num4 = this.doubleClickTimer;
112 int num5 = this.lastItemClicked;
114 }
115 int myPlayer9 = Main.myPlayer;
118 Recipe.FindRecipes(false);
120 if (guicontrollerCoins != null)
121 {
123 return;
124 }
125 }
126
127 // Token: 0x060007DE RID: 2014 RVA: 0x0001EFA4 File Offset: 0x0001D1A4
129 {
130 /*
131An exception occurred when decompiling this method (060007DE)
132
133ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUICoins::CanBeStored(Terraria.Item)
134
135 ---> System.Exception: Basic block has to end with unconditional control flow.
136{
137 Block_0:
138 stloc:int32(var_0_06, ldfld:int32(Item::type, ldloc:Item(checkItem)))
139}
140
141 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
142 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
143 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
144 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
145 --- End of inner exception stack trace ---
146 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
147 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
148*/;
149 }
150
151 // Token: 0x060007DF RID: 2015 RVA: 0x0001EFBC File Offset: 0x0001D1BC
152 public void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
153 {
154 this.ItemOver(index);
158 int num = this.cursorOver;
159 if (!true)
160 {
161 }
162 if (this.itemOver == 0)
163 {
164 }
167 if (60 == 0)
168 {
169 }
170 ItemSlot.SetSelectHighlight(true, scale);
171 if (instance == null)
172 {
173 }
174 Main.inventoryScale = scale;
175 int myPlayer = Main.myPlayer;
176 int num2 = 16256;
177 int myPlayer2 = Main.myPlayer;
178 if (num2 == 0)
179 {
180 }
181 }
182
183 // Token: 0x060007E0 RID: 2016 RVA: 0x0001F0BC File Offset: 0x0001D2BC
184 public void Draw()
185 {
186 int num = 1;
187 float num2 = this.doubleClickTimer;
188 float deltaTime = Time.deltaTime;
190 if (num == 0)
191 {
192 }
193 if (num == 0)
194 {
195 }
198 this.itemOver = (int)deltaTime;
204 if (instance2 == null)
205 {
206 }
207 if (this.rightClickHeld)
208 {
209 int num3 = this.itemOver;
210 }
211 int num4 = this.itemDragStart;
212 if (num4 == 0)
213 {
214 }
215 bool mouseLeft = Main.mouseLeft;
216 if (num4 == 0)
217 {
218 }
219 if (Main.mouseItem != null)
220 {
221 if (num4 == 0)
222 {
223 }
224 int type = Main.mouseItem.type;
225 if (type != 0)
226 {
227 this.itemDragStart = type;
228 return;
229 }
230 }
231 int num5 = this.itemDragStart;
232 int num6 = this.itemOver;
233 int myPlayer = Main.myPlayer;
234 int num7 = this.itemDragStart;
235 if (num6 == 0)
236 {
237 }
238 Recipe.FindRecipes(false);
239 }
240
241 // Token: 0x0400066E RID: 1646
242 private int itemOver = 1;
243
244 // Token: 0x0400066F RID: 1647
245 private int cursorOver;
246
247 // Token: 0x04000670 RID: 1648
248 private int itemDragStart = 1;
249
250 // Token: 0x04000671 RID: 1649
251 private int lastItemClicked;
252
253 // Token: 0x04000672 RID: 1650
254 private float doubleClickTimer;
255
256 // Token: 0x04000673 RID: 1651
257 private bool rightClickHeld;
258
259 // Token: 0x04000674 RID: 1652
261
262 // Token: 0x04000675 RID: 1653
264
265 // Token: 0x04000676 RID: 1654
267}
class f__AnonymousType0<< Count > j__TPar
int itemOver
Definition GUICoins.cs:242
float doubleClickTimer
Definition GUICoins.cs:254
int itemDragStart
Definition GUICoins.cs:248
GUICoins()
Definition GUICoins.cs:12
GUIItemGrid.DrawItemHandler itemDrawDelegate
Definition GUICoins.cs:266
float ItemScale(int index)
Definition GUICoins.cs:30
void Draw()
Definition GUICoins.cs:184
void ItemOver(int index)
Definition GUICoins.cs:55
int cursorOver
Definition GUICoins.cs:245
GUIItemGrid.GetItemScaleHandler ItemScaleDelegate
Definition GUICoins.cs:260
int lastItemClicked
Definition GUICoins.cs:251
bool CanBeStored(Item checkItem)
Definition GUICoins.cs:128
void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
Definition GUICoins.cs:152
bool rightClickHeld
Definition GUICoins.cs:257
Rectangle GetRegion()
Definition GUICoins.cs:17
GUIItemGrid.CursorOver ItemOverDelegate
Definition GUICoins.cs:263
bool IsAir
Definition Item.cs:1820
static int myPlayer
Definition Main.cs:2337
static bool mouseRight
Definition Main.cs:685
static Item mouseItem
Definition Main.cs:2155
static bool mouseLeft
Definition Main.cs:671
static void FindRecipes(bool canDelayCheck=false)
Definition Recipe.cs:204
static void SetSelectHighlight(bool hasFocus, float highlightScale=-1f)
Definition ItemSlot.cs:702
static float deltaTime
Definition Time.cs:14