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
GUIItemDuplication.cs
Go to the documentation of this file.
1using System;
3using Controller;
6using Terraria;
8using Terraria.UI;
9
10// Token: 0x0200014E RID: 334
12{
13 // Token: 0x0600091C RID: 2332 RVA: 0x00027874 File Offset: 0x00025A74
14 public void Reset()
15 {
16 if (!true)
17 {
18 }
19 if (!true)
20 {
21 }
22 }
23
24 // Token: 0x170000E5 RID: 229
25 // (get) Token: 0x0600091D RID: 2333 RVA: 0x00027888 File Offset: 0x00025A88
26 public bool HasFocus
27 {
28 get
29 {
32 bool flag;
33 return flag;
34 }
35 }
36
37 // Token: 0x170000E6 RID: 230
38 // (get) Token: 0x0600091E RID: 2334 RVA: 0x000278B0 File Offset: 0x00025AB0
39 public bool Collapsed
40 {
41 get
42 {
43 if (!true)
44 {
45 }
47 }
48 }
49
50 // Token: 0x0600091F RID: 2335 RVA: 0x000278D0 File Offset: 0x00025AD0
51 public void DrawCraftButton()
52 {
53 int focusItem = this.FocusItem;
54 int size = this.FilteredItems._size;
55 if (this.Filter.Expanded)
56 {
58 }
59 if (size != 0)
60 {
61 return;
62 }
63 long num = 0L;
64 Cursor cursor;
65 if (cursor != null)
66 {
67 return;
68 }
69 if (Main.mouseItem.type != 0)
70 {
71 if (num != 0L)
72 {
73 if (size != 0)
74 {
75 return;
76 }
77 if (size != 0)
78 {
79 return;
80 }
82 {
83 return;
84 }
86 int focusItem2 = this.FocusItem;
87 string textValue = Language.GetTextValue("Mobile.Duplicate");
89 int focusItem3 = this.FocusItem;
92 {
94 int focusItem4 = this.FocusItem;
95 if (hoverDuplicateEntry == 0)
96 {
97 }
98 Main.mouseRight = true;
99 return;
100 }
101 int type = Main.mouseItem.type;
102 if (type != 0)
103 {
104 if (type == 0)
105 {
106 }
107 if (Main.mouseItem.stack != 0)
108 {
109 }
110 }
112 int focusItem5 = this.FocusItem;
113 if (hoverDuplicateEntry == 0)
114 {
115 }
116 return;
117 }
118 }
119 else
120 {
121 while (num != 0L)
122 {
123 }
124 }
125 }
126
127 // Token: 0x06000920 RID: 2336 RVA: 0x00027AC4 File Offset: 0x00025CC4
128 public void ResetFilters()
129 {
130 GUIItemFilter filter = this.Filter;
131 }
132
133 // Token: 0x06000921 RID: 2337 RVA: 0x000021DB File Offset: 0x000003DB
134 private void UpdateFilter(bool force = false)
135 {
136 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
137 }
138
139 // Token: 0x06000922 RID: 2338 RVA: 0x00027AD8 File Offset: 0x00025CD8
140 private int CompareItemOrder(int x, int y)
141 {
142 int num;
143 do
144 {
145 if (!true)
146 {
147 }
148 }
149 while (num != 0 || num.CompareTo(y) != 0);
150 string text;
151 string text2;
152 return text.CompareTo(text2);
153 }
154
155 // Token: 0x06000923 RID: 2339 RVA: 0x00027AFC File Offset: 0x00025CFC
165
166 // Token: 0x06000924 RID: 2340 RVA: 0x00027B24 File Offset: 0x00025D24
167 public void Draw()
168 {
169 int num = 1;
170 if (num == 0)
171 {
172 }
173 if (num == 0)
174 {
175 }
176 long num2 = 0L;
177 this.UpdateFilter(num2 != 0L);
179 string textValue = Language.GetTextValue("Mobile.Duplication");
180 int num3 = 1;
184 int itemCount = draggableItemGrid_Layout.ItemCount;
185 if (num3 == 0)
186 {
187 }
189 if (rectangle == null)
190 {
191 }
192 int mouseX = Main.mouseX;
193 int mouseY = Main.mouseY;
194 }
195
196 // Token: 0x06000925 RID: 2341 RVA: 0x00027BD4 File Offset: 0x00025DD4
197 public float CraftItemScale(int index)
198 {
199 /*
200An exception occurred when decompiling this method (06000925)
201
202ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIItemDuplication::CraftItemScale(System.Int32)
203
204 ---> System.Exception: Basic block has to end with unconditional control flow.
205{
206 Block_0:
207 stloc:!0(var_0_05, callgetter:!0(PageControllerLayoutDefinition`1::get_Instance))
208}
209
210 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
211 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
212 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
213 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
214 --- End of inner exception stack trace ---
215 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
216 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
217*/;
218 }
219
220 // Token: 0x06000926 RID: 2342 RVA: 0x00027BE8 File Offset: 0x00025DE8
221 public void CraftItemOver(int index)
222 {
223 int offset = this.Offset;
224 int num = 1;
225 this.wasOverItem = num != 0;
227 int focusItem = this.FocusItem;
228 int size = this.FilteredItems._size;
230 Cursor cursor;
231 if (cursor != null)
232 {
233 return;
234 }
235 long num2 = 0L;
236 int focusItem2 = this.FocusItem;
237 if (focusItem2 == 0)
238 {
239 }
240 bool mouseLeft = Main.mouseLeft;
241 if (focusItem2 == 0)
242 {
243 }
244 bool mouseLeftRelease = Main.mouseLeftRelease;
245 if (num2 != 0L && !this.lastRightDown)
246 {
247 int size2 = this.FilteredItems._size;
248 int focusItem3 = this.FocusItem;
251 if (num == 0 && guicontrollerItemDuplication != null)
252 {
253 int focusItem4 = this.FocusItem;
256 }
257 }
259 int size3 = this.FilteredItems._size;
260 if (size3 == 0)
261 {
262 }
263 int num3 = 1;
265 if (size3 == 0)
266 {
267 }
269 if (num3 == 0)
270 {
271 }
272 }
273
274 // Token: 0x06000927 RID: 2343 RVA: 0x00027CF4 File Offset: 0x00025EF4
275 public void CraftItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
276 {
277 int offset = this.Offset;
278 int num = this.cursorOver;
279 bool hasFocus = this.HasFocus;
280 if (num == 0)
281 {
282 }
283 if (!true)
284 {
285 }
286 if (this.FilteredItems._size == 0)
287 {
288 }
289 Main.inventoryScale = scale;
290 int focusItem = this.FocusItem;
291 if (num == 0)
292 {
294 int focusItem2 = this.FocusItem;
295 }
296 int num2 = this.cursorOver;
297 bool hasFocus2 = this.HasFocus;
299 if (num2 == 0)
300 {
301 }
302 ItemSlot.SetSelectHighlight(true, scale);
303 if (instance == null)
304 {
305 }
307 if (num2 == 0)
308 {
309 }
310 if (num2 == 0)
311 {
312 }
313 }
314
315 // Token: 0x06000928 RID: 2344 RVA: 0x00027DE0 File Offset: 0x00025FE0
317 {
318 }
319
320 // Token: 0x0400088B RID: 2187
321 private float CraftButtonScale = (float)1;
322
323 // Token: 0x0400088C RID: 2188
324 private int Offset;
325
326 // Token: 0x0400088D RID: 2189
327 public int FocusItem;
328
329 // Token: 0x0400088E RID: 2190
330 private int LastId;
331
332 // Token: 0x0400088F RID: 2191
334
335 // Token: 0x04000890 RID: 2192
336 private string LastSearch;
337
338 // Token: 0x04000891 RID: 2193
339 private bool rightClickHeld;
340
341 // Token: 0x04000892 RID: 2194
343
344 // Token: 0x04000893 RID: 2195
346
347 // Token: 0x04000894 RID: 2196
349
350 // Token: 0x04000895 RID: 2197
351 public float craftScrollOffset;
352
353 // Token: 0x04000896 RID: 2198
354 private float craftScrollMomentum;
355
356 // Token: 0x04000897 RID: 2199
358
359 // Token: 0x04000898 RID: 2200
361
362 // Token: 0x04000899 RID: 2201
363 private bool pendingCraft;
364
365 // Token: 0x0400089A RID: 2202
366 public float hoverCraftDelay;
367
368 // Token: 0x0400089B RID: 2203
370
371 // Token: 0x0400089C RID: 2204
372 private bool wasOverItem;
373
374 // Token: 0x0400089D RID: 2205
375 private int multiCraftDelay;
376
377 // Token: 0x0400089E RID: 2206
378 private int slowRampUp;
379
380 // Token: 0x0400089F RID: 2207
381 private int multiCraftRecipe;
382
383 // Token: 0x040008A0 RID: 2208
385
386 // Token: 0x040008A1 RID: 2209
387 private int cursorOver;
388
389 // Token: 0x040008A2 RID: 2210
390 private bool lastRightDown;
391
392 // Token: 0x040008A3 RID: 2211
394
395 // Token: 0x040008A4 RID: 2212
396 private string materialHoverItemName;
397
398 // Token: 0x040008A5 RID: 2213
400}
class f__AnonymousType0<< Count > j__TPar
static DrPlatform.DrPlatformType CurrentPlatform
Definition DrPlatform.cs:26
float CraftItemScale(int index)
GUIItemFilter.CategoryFilter LastCategory
void UpdateFilter(bool force=false)
GUITransactionButton.InputState lastState
void CraftItemOver(int index)
int CompareItemOrder(int x, int y)
void CraftItemDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
GUIControllerItemFilter _controller
bool IsCollapsed(GUIPageIcons.Category category)
static InterfaceProfile_Layout Active
static string GetTextValue(string key)
Definition Language.cs:54
static bool mouseLeftRelease
Definition Main.cs:2029
static Item mouseItem
Definition Main.cs:2155
static int mouseY
Definition Main.cs:601
static int mouseX
Definition Main.cs:587
static bool mouseLeft
Definition Main.cs:671
static void SetSelectHighlight(bool hasFocus, float highlightScale=-1f)
Definition ItemSlot.cs:702
static bool ControllerModeLocked