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
GUIBuffs.cs
Go to the documentation of this file.
1using System;
4using Terraria;
6using Terraria.UI;
7using UnityEngine;
8
9// Token: 0x02000125 RID: 293
10public class GUIBuffs
11{
12 // Token: 0x06000789 RID: 1929 RVA: 0x0001C344 File Offset: 0x0001A544
13 public GUIBuffs()
14 {
15 if (!true)
16 {
17 }
18 base..ctor();
19 }
20
21 // Token: 0x0600078A RID: 1930 RVA: 0x0001C364 File Offset: 0x0001A564
23 {
25 if (instance == null)
26 {
27 }
28 float num = instance.ItemScale;
29 if (32 == 0)
30 {
31 }
33 return rectangle;
34 }
35
36 // Token: 0x0600078B RID: 1931 RVA: 0x0001C388 File Offset: 0x0001A588
37 private void ChangeBuffString(int buffType)
38 {
39 if (!true)
40 {
41 }
42 string buffDescription = Lang.GetBuffDescription(buffType);
43 bool expertMode = Main.expertMode;
44 string textValue = Language.GetTextValue("BuffDescription.WellFed_Expert");
45 }
46
47 // Token: 0x0600078C RID: 1932 RVA: 0x0001C3B4 File Offset: 0x0001A5B4
48 private void NextItem()
49 {
52 this.buffActive = true;
53 guicontrollerBuff.Activate();
54 }
55
56 // Token: 0x0600078D RID: 1933 RVA: 0x0001C3FC File Offset: 0x0001A5FC
57 private void PreviousItem()
58 {
61 this.buffActive = true;
62 guicontrollerBuff.Activate();
63 }
64
65 // Token: 0x0600078E RID: 1934 RVA: 0x0001C444 File Offset: 0x0001A644
66 private void RemoveBuff()
67 {
69 int num = this.numActiveBuffs;
70 int[] array = this.activeBuffs;
71 }
72
73 // Token: 0x0600078F RID: 1935 RVA: 0x0001C468 File Offset: 0x0001A668
75 {
76 int num = this.numActiveBuffs;
77 int num2 = this.numActiveBuffs;
78 if (this.buffActive && this.numActiveBuffs != 0)
79 {
80 bool flag = this.CanRemoveBuff();
81 return;
82 }
83 int num3 = this.numActiveBuffs;
85 if (!this.buffTogglePressed)
86 {
87 this.NextItem();
88 return;
89 }
90 if (this.buffActive)
91 {
93 int num4 = this.numActiveBuffs;
94 int[] array = this.activeBuffs;
95 return;
96 }
97 int num5 = 1;
98 this.buffActive = num5 != 0;
101 if (num5 == 0)
102 {
103 }
108 }
109
110 // Token: 0x06000790 RID: 1936 RVA: 0x0001C534 File Offset: 0x0001A734
111 private bool CanRemoveBuff()
112 {
113 /*
114An exception occurred when decompiling this method (06000790)
115
116ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUIBuffs::CanRemoveBuff()
117
118 ---> System.Exception: Basic block has to end with unconditional control flow.
119{
120 IL_0016:
121 stloc:int32(var_3_1D, callgetter:int32(Main::get_myPlayer))
122}
123
124 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
125 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
126 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
127 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
128 --- End of inner exception stack trace ---
129 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
130 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
131*/;
132 }
133
134 // Token: 0x06000791 RID: 1937 RVA: 0x0001C564 File Offset: 0x0001A764
135 private void RemoveBuff(int buff)
136 {
137 if (!true)
138 {
139 }
140 int myPlayer = Main.myPlayer;
141 }
142
143 // Token: 0x06000792 RID: 1938 RVA: 0x0001C608 File Offset: 0x0001A808
144 public void Draw()
145 {
149 int myPlayer = Main.myPlayer;
150 int myPlayer2 = Main.myPlayer;
152 float num = this.lastdoubleClickTimer;
153 float deltaTime = Time.deltaTime;
154 int myPlayer3 = Main.myPlayer;
155 int[] array = this.activeBuffs;
156 int num2 = this.numActiveBuffs;
158 }
159
160 // Token: 0x06000793 RID: 1939 RVA: 0x0001C714 File Offset: 0x0001A914
161 public float ItemScale(int index)
162 {
163 /*
164An exception occurred when decompiling this method (06000793)
165
166ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIBuffs::ItemScale(System.Int32)
167
168 ---> System.Exception: Basic block has to end with unconditional control flow.
169{
170 Block_0:
171 stloc:float32(var_1_0C, ldfld:float32(Buffs_Layout::ItemScale, callgetter:Buffs_Layout(Buffs_Layout::get_Instance)))
172}
173
174 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
175 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
176 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
177 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
178 --- End of inner exception stack trace ---
179 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
180 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
181*/;
182 }
183
184 // Token: 0x06000794 RID: 1940 RVA: 0x0001C730 File Offset: 0x0001A930
185 public void ItemOver(int index)
186 {
187 int[] array = this.activeBuffs;
190 bool mouseLeft = Main.mouseLeft;
192 int num = 1;
193 this.buffActive = num != 0;
194 guicontrollerBuff.Activate();
195 if (num == 0)
196 {
197 }
200 int num2 = this.lastDrawBuffText;
202 bool mouseLeftRelease = Main.mouseLeftRelease;
203 float num3 = this.lastdoubleClickTimer;
204 }
205
206 // Token: 0x06000795 RID: 1941 RVA: 0x0001C7D4 File Offset: 0x0001A9D4
207 public void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
208 {
209 int[] array = this.activeBuffs;
210 int num = this.buffOver;
211 }
212
213 // Token: 0x04000607 RID: 1543
214 private int buffOver;
215
216 // Token: 0x04000608 RID: 1544
217 private int buffToRemove;
218
219 // Token: 0x04000609 RID: 1545
220 private int lastDrawBuffText = 1;
221
222 // Token: 0x0400060A RID: 1546
223 private float lastdoubleClickTimer;
224
225 // Token: 0x0400060B RID: 1547
226 public int numActiveBuffs;
227
228 // Token: 0x0400060C RID: 1548
229 private int[] activeBuffs;
230
231 // Token: 0x0400060D RID: 1549
232 public bool buffTogglePressed;
233
234 // Token: 0x0400060E RID: 1550
235 public bool buffActive;
236
237 // Token: 0x0400060F RID: 1551
239
240 // Token: 0x04000610 RID: 1552
242
243 // Token: 0x04000611 RID: 1553
245
246 // Token: 0x04000612 RID: 1554
248
249 // Token: 0x04000613 RID: 1555
251}
class f__AnonymousType0<< Count > j__TPar
static Buffs_Layout Instance
int lastDrawBuffText
Definition GUIBuffs.cs:220
void ItemOver(int index)
Definition GUIBuffs.cs:185
void ChangeBuffString(int buffType)
Definition GUIBuffs.cs:37
GUIItemGrid.DrawItemHandler itemDraw
Definition GUIBuffs.cs:250
void RemoveBuff()
Definition GUIBuffs.cs:66
int buffToRemove
Definition GUIBuffs.cs:217
Rectangle GetRegion()
Definition GUIBuffs.cs:22
bool CanRemoveBuff()
Definition GUIBuffs.cs:111
float ItemScale(int index)
Definition GUIBuffs.cs:161
int[] activeBuffs
Definition GUIBuffs.cs:229
GUIControllerBuff buffController
Definition GUIBuffs.cs:238
void PreviousItem()
Definition GUIBuffs.cs:57
bool buffTogglePressed
Definition GUIBuffs.cs:232
void Draw()
Definition GUIBuffs.cs:144
GUIItemGrid.GetItemScaleHandler itemScale
Definition GUIBuffs.cs:244
void NextItem()
Definition GUIBuffs.cs:48
GUIBuffs()
Definition GUIBuffs.cs:13
float lastdoubleClickTimer
Definition GUIBuffs.cs:223
void ItemDraw(ItemGrid_Layout gridLayout, int index, Microsoft.Xna.Framework.Vector2 position, float scale)
Definition GUIBuffs.cs:207
GUIItemGrid.CursorOver itemOver
Definition GUIBuffs.cs:247
int buffOver
Definition GUIBuffs.cs:214
void RemoveBuff(int buff)
Definition GUIBuffs.cs:135
void UpdateBuffNavigation()
Definition GUIBuffs.cs:74
DateTime NavigationTick
Definition GUIBuffs.cs:241
int numActiveBuffs
Definition GUIBuffs.cs:226
bool buffActive
Definition GUIBuffs.cs:235
static InterfaceProfile_Layout Active
static string GetBuffDescription(int id)
Definition Lang.cs:249
static string GetTextValue(string key)
Definition Language.cs:54
static int myPlayer
Definition Main.cs:2337
static bool expertMode
Definition Main.cs:4186
static bool mouseLeftRelease
Definition Main.cs:2029
static bool mouseLeft
Definition Main.cs:671
static void UpdateTooltipContext(int context, int slot)
Definition ItemSlot.cs:972
static float deltaTime
Definition Time.cs:14
static float UITextAlpha
static DateTime Now
Definition DateTime.cs:530