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
GUIChest.cs
Go to the documentation of this file.
1using System;
2using Controller;
5using Terraria;
7using Terraria.UI;
8using UnityEngine;
9
10// Token: 0x02000129 RID: 297
11public class GUIChest
12{
13 // Token: 0x060007AB RID: 1963 RVA: 0x0001D3D8 File Offset: 0x0001B5D8
14 public GUIChest()
15 {
16 }
17
18 // Token: 0x060007AC RID: 1964 RVA: 0x0001D408 File Offset: 0x0001B608
26
27 // Token: 0x060007AD RID: 1965 RVA: 0x0001D428 File Offset: 0x0001B628
29 {
30 /*
31An exception occurred when decompiling this method (060007AD)
32
33ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Item GUIChest::GetSelectedItem()
34
35 ---> System.Exception: Basic block has to end with unconditional control flow.
36{
37 IL_0003:
38 stloc:int32(var_1_0A, callgetter:int32(Main::get_myPlayer))
39}
40
41 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
42 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
43 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
44 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
45 --- End of inner exception stack trace ---
46 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
47 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
48*/;
49 }
50
51 // Token: 0x060007AE RID: 1966 RVA: 0x0001D440 File Offset: 0x0001B640
52 public void EquipChestItem()
53 {
54 int myPlayer = Main.myPlayer;
55 }
56
57 // Token: 0x060007AF RID: 1967 RVA: 0x0001D478 File Offset: 0x0001B678
58 public void UpdateSelectedItem()
59 {
60 if (!true)
61 {
62 }
63 int myPlayer = Main.myPlayer;
65 int num = this.itemSelected;
66 }
67
68 // Token: 0x170000D0 RID: 208
69 // (get) Token: 0x060007B0 RID: 1968 RVA: 0x0001D4A4 File Offset: 0x0001B6A4
70 public bool collapsed
71 {
72 get
73 {
74 }
75 }
76
77 // Token: 0x060007B1 RID: 1969 RVA: 0x0001D4B4 File Offset: 0x0001B6B4
78 public void RefreshLangStrings()
79 {
80 int num = this.lastLang;
84 string text;
85 string text2;
86 string text3;
87 string text4;
88 string text5;
89 if ((text == null || text != null) && (text2 == null || text2 != null) && (text3 == null || text3 != null) && (text4 == null || text4 != null) && (text5 == null || text5 != null))
90 {
91 return;
92 }
94 }
95
96 // Token: 0x170000D1 RID: 209
97 // (get) Token: 0x060007B2 RID: 1970 RVA: 0x0001D51C File Offset: 0x0001B71C
98 public bool HasFocus
99 {
100 get
101 {
103 return true;
104 }
105 }
106
107 // Token: 0x060007B3 RID: 1971 RVA: 0x0001D534 File Offset: 0x0001B734
108 public void Draw()
109 {
110 int myPlayer = Main.myPlayer;
111 int myPlayer2 = Main.myPlayer;
112 int myPlayer3 = Main.myPlayer;
113 Tile tile;
114 ushort type = tile.type;
115 int myPlayer4 = Main.myPlayer;
116 Recipe.FindRecipes(false);
117 }
118
119 // Token: 0x060007B4 RID: 1972 RVA: 0x0001D580 File Offset: 0x0001B780
120 public string GetName()
121 {
122 return Lang.GetItemNameValue(48);
123 }
124
125 // Token: 0x060007B5 RID: 1973 RVA: 0x0001D60C File Offset: 0x0001B80C
126 public string GetTitle()
127 {
128 if (!true)
129 {
130 }
131 int myPlayer = Main.myPlayer;
132 Tile tile;
133 ushort type = tile.type;
134 if ("BuffName.ChesterPet" == null)
135 {
136 }
137 return Lang.GetItemNameValue(3813);
138 }
139
140 // Token: 0x060007B6 RID: 1974 RVA: 0x0001D668 File Offset: 0x0001B868
146
147 // Token: 0x060007B7 RID: 1975 RVA: 0x0001D68C File Offset: 0x0001B88C
149 {
150 }
151
152 // Token: 0x060007B8 RID: 1976 RVA: 0x0001D69C File Offset: 0x0001B89C
153 public float ItemScale(int index)
154 {
155 /*
156An exception occurred when decompiling this method (060007B8)
157
158ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIChest::ItemScale(System.Int32)
159
160 ---> System.Exception: Basic block has to end with unconditional control flow.
161{
162 Block_0:
163 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
164}
165
166 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
167 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
168 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
169 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
170 --- End of inner exception stack trace ---
171 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
172 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
173*/;
174 }
175
176 // Token: 0x060007B9 RID: 1977 RVA: 0x0001D6B0 File Offset: 0x0001B8B0
177 public void ItemOver(int index)
178 {
179 int num = 1;
181 if (num == 0)
182 {
183 }
184 int myPlayer = Main.myPlayer;
185 }
186
187 // Token: 0x060007BA RID: 1978 RVA: 0x0001D918 File Offset: 0x0001BB18
188 public void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
189 {
190 if (!true)
191 {
192 }
193 int myPlayer = Main.myPlayer;
194 if (this.dummySlots == null)
195 {
196 Item[] array = this.dummySlots;
197 return;
198 }
199 int num = this.cursorOver;
200 if (!true)
201 {
202 }
203 if (this.itemOver == 0)
204 {
205 }
208 ItemSlot.SetSelectHighlight(true, scale);
209 }
210
211 // Token: 0x060007BB RID: 1979 RVA: 0x0001D99C File Offset: 0x0001BB9C
212 private void DrawSlots(SpriteBatch spriteBatch)
213 {
214 float num = this.doubleClickTimer;
215 float deltaTime = Time.deltaTime;
216 }
217
218 // Token: 0x04000633 RID: 1587
219 public float scrollOffset;
220
221 // Token: 0x04000634 RID: 1588
222 private float scrollMomentum;
223
224 // Token: 0x04000635 RID: 1589
225 private int scrollDragging;
226
227 // Token: 0x04000636 RID: 1590
229
230 // Token: 0x04000637 RID: 1591
231 public int itemSelected;
232
233 // Token: 0x04000638 RID: 1592
234 private int itemOver;
235
236 // Token: 0x04000639 RID: 1593
237 private int itemDragStart;
238
239 // Token: 0x0400063A RID: 1594
240 private int cursorOver;
241
242 // Token: 0x0400063B RID: 1595
243 private int lastLang;
244
245 // Token: 0x0400063C RID: 1596
246 public string[] options;
247
248 // Token: 0x0400063D RID: 1597
249 private int lastItemClicked = 1;
250
251 // Token: 0x0400063E RID: 1598
252 private float doubleClickTimer;
253
254 // Token: 0x0400063F RID: 1599
255 private bool rightClickHeld;
256
257 // Token: 0x04000640 RID: 1600
258 private float LootButtonScale = (float)16256;
259
260 // Token: 0x04000641 RID: 1601
261 private bool canLoot;
262
263 // Token: 0x04000642 RID: 1602
264 private bool canLootAll;
265
266 // Token: 0x04000643 RID: 1603
267 private bool canDepositAll;
268
269 // Token: 0x04000644 RID: 1604
270 public bool menuOpen;
271
272 // Token: 0x04000645 RID: 1605
273 private float menuButtonScale = (float)16256;
274
275 // Token: 0x04000646 RID: 1606
276 private float[] buttonScale;
277
278 // Token: 0x04000647 RID: 1607
280
281 // Token: 0x04000648 RID: 1608
282 private Item[] dummySlots;
283
284 // Token: 0x04000649 RID: 1609
286
287 // Token: 0x0400064A RID: 1610
289
290 // Token: 0x0400064B RID: 1611
292}
class f__AnonymousType0<< Count > j__TPar
static DrPlatform.DrPlatformType CurrentPlatform
Definition DrPlatform.cs:26
void Draw()
Definition GUIChest.cs:108
float[] buttonScale
Definition GUIChest.cs:276
float LootButtonScale
Definition GUIChest.cs:258
int lastItemClicked
Definition GUIChest.cs:249
bool canLoot
Definition GUIChest.cs:261
void ItemOver(int index)
Definition GUIChest.cs:177
bool canDepositAll
Definition GUIChest.cs:267
bool collapsed
Definition GUIChest.cs:71
GUIItemGrid.DrawItemHandler itemDrawHandler
Definition GUIChest.cs:291
float menuButtonScale
Definition GUIChest.cs:273
void DrawSlots(SpriteBatch spriteBatch)
Definition GUIChest.cs:212
string[] options
Definition GUIChest.cs:246
bool HasFocus
Definition GUIChest.cs:99
float ItemScale(int index)
Definition GUIChest.cs:153
Item GetSelectedItem()
Definition GUIChest.cs:28
void DrawButtons(SpriteBatch spritebatch)
Definition GUIChest.cs:148
bool rightClickHeld
Definition GUIChest.cs:255
bool canLootAll
Definition GUIChest.cs:264
GUIItemGrid.GetItemScaleHandler itemScaleHandler
Definition GUIChest.cs:285
void RefreshLangStrings()
Definition GUIChest.cs:78
GUIItemGrid.CursorOver itemOverHandler
Definition GUIChest.cs:288
string GetName()
Definition GUIChest.cs:120
bool menuOpen
Definition GUIChest.cs:270
int scrollDragging
Definition GUIChest.cs:225
int itemDragStart
Definition GUIChest.cs:237
GUIChest()
Definition GUIChest.cs:14
void DrawName(SpriteBatch spritebatch)
Definition GUIChest.cs:141
Microsoft.Xna.Framework.Vector2 dragOffset
Definition GUIChest.cs:228
float scrollOffset
Definition GUIChest.cs:219
string GetTitle()
Definition GUIChest.cs:126
Item[] dummySlots
Definition GUIChest.cs:282
int itemOver
Definition GUIChest.cs:234
Rectangle menuRegion
Definition GUIChest.cs:279
float scrollMomentum
Definition GUIChest.cs:222
int lastLang
Definition GUIChest.cs:243
void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
Definition GUIChest.cs:188
int cursorOver
Definition GUIChest.cs:240
void LoadPageRegion()
Definition GUIChest.cs:19
float doubleClickTimer
Definition GUIChest.cs:252
void EquipChestItem()
Definition GUIChest.cs:52
int itemSelected
Definition GUIChest.cs:231
void UpdateSelectedItem()
Definition GUIChest.cs:58
static string GetItemNameValue(int id)
Definition Lang.cs:213
static GameCulture ActiveCulture
Definition Language.cs:15
static int myPlayer
Definition Main.cs:2337
static bool NetClient
Definition Main.cs:5438
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
static bool ControllerModeLocked
ushort type
Definition Tile.cs:58