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
Chest.cs
Go to the documentation of this file.
1using System;
5
6namespace Terraria
7{
8 // Token: 0x020003EB RID: 1003
9 public class Chest : IFixLoadedData
10 {
11 // Token: 0x06001AAB RID: 6827 RVA: 0x0006D0AC File Offset: 0x0006B2AC
12 public Chest(bool bank = false)
13 {
14 }
15
16 // Token: 0x06001AAC RID: 6828 RVA: 0x0006D0C0 File Offset: 0x0006B2C0
17 public override string ToString()
18 {
19 long entityId = this.item.entityId;
20 return "{{X: {0}, Y: {1}, Count: {2}}}";
21 }
22
23 // Token: 0x06001AAD RID: 6829 RVA: 0x0006D0F4 File Offset: 0x0006B2F4
24 public static void Initialize()
25 {
26 if (!true)
27 {
28 }
29 }
30
31 // Token: 0x06001AAE RID: 6830 RVA: 0x0006D104 File Offset: 0x0006B304
32 private static bool IsPlayerInChest(int i)
33 {
34 int num = 1;
35 if (num == 0)
36 {
37 }
38 if (num == 0 || num == 0)
39 {
40 return;
41 }
42 }
43
44 // Token: 0x06001AAF RID: 6831 RVA: 0x0006D124 File Offset: 0x0006B324
46 {
47 /*
48An exception occurred when decompiling this method (06001AAF)
49
50ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.List`1<System.Int32> Terraria.Chest::GetCurrentlyOpenChests()
51
52 ---> System.Exception: Basic block has to end with unconditional control flow.
53{
54 Block_0:
55 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
56}
57
58 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
59 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
60 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
61 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
62 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
63 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
64 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
65 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
66 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
67 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
68 --- End of inner exception stack trace ---
69 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
70 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
71*/;
72 }
73
74 // Token: 0x06001AB0 RID: 6832 RVA: 0x0006D140 File Offset: 0x0006B340
75 public static bool IsLocked(int x, int y)
76 {
77 if (!true)
78 {
79 }
80 bool flag;
81 return flag;
82 }
83
84 // Token: 0x06001AB1 RID: 6833 RVA: 0x0006D154 File Offset: 0x0006B354
85 public static bool IsLocked(Tile t)
86 {
87 }
88
89 // Token: 0x06001AB2 RID: 6834 RVA: 0x0006D168 File Offset: 0x0006B368
90 public static void ServerPlaceItem(int plr, int slot)
91 {
92 if (!true)
93 {
94 }
95 }
96
97 // Token: 0x06001AB3 RID: 6835 RVA: 0x0006D184 File Offset: 0x0006B384
98 public static Item PutItemInNearbyChest(Item item, Vector2 position)
99 {
100 int num = 1;
101 if (num == 0)
102 {
103 }
105 long num2 = 0L;
106 if (num == 0)
107 {
108 }
109 int num4;
110 if (num != 0)
111 {
112 if (num == 0)
113 {
114 }
115 bool flag = Chest.IsPlayerInChest((int)num2);
116 if (num == 0)
117 {
118 }
119 if (num == 0)
120 {
121 }
122 if (num == 0)
123 {
124 }
125 Vector2 vector;
126 float num3 = vector.Length();
127 if (num == 0)
128 {
129 }
130 num4 = 4;
131 if (num4 == 0 || num4 == 0)
132 {
133 }
134 }
135 if (num4 == 0)
136 {
137 }
138 if (num4 == 0)
139 {
140 }
141 throw new ArrayTypeMismatchException();
142 }
143
144 // Token: 0x06001AB4 RID: 6836 RVA: 0x0006D1F0 File Offset: 0x0006B3F0
146 {
147 }
148
149 // Token: 0x06001AB5 RID: 6837 RVA: 0x0006D204 File Offset: 0x0006B404
151 {
152 int num = 1;
153 if (num == 0)
154 {
155 }
156 if (num == 0)
157 {
158 }
159 if (num == 0)
160 {
161 }
162 }
163
164 // Token: 0x06001AB6 RID: 6838 RVA: 0x0006D224 File Offset: 0x0006B424
165 public object Clone()
166 {
167 return base.MemberwiseClone();
168 }
169
170 // Token: 0x06001AB7 RID: 6839 RVA: 0x0006D238 File Offset: 0x0006B438
171 public static bool Unlock(int X, int Y)
172 {
173 /*
174An exception occurred when decompiling this method (06001AB7)
175
176ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Chest::Unlock(System.Int32,System.Int32)
177
178 ---> System.Exception: Basic block has to end with unconditional control flow.
179{
180 IL_0003:
181 stloc:uint16(var_5_0A, callgetter:uint16(Tile::get_type, ldloc:Tile[exp:valuetype Terraria.Tile&](var_4)))
182 call:void(AchievementsHelper::NotifyProgressionEvent, ldc.i4:int32(19))
183 stloc:uint16(var_13_30, callgetter:uint16(Tile::get_type, ldloc:Tile[exp:valuetype Terraria.Tile&](var_12)))
184 call:void(AchievementsHelper::NotifyProgressionEvent, ldc.i4:int32(20))
185}
186
187 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
188 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
189 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
190 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
191 --- End of inner exception stack trace ---
192 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
193 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
194*/;
195 }
196
197 // Token: 0x06001AB8 RID: 6840 RVA: 0x0006D288 File Offset: 0x0006B488
198 public static bool Lock(int X, int Y)
199 {
200 /*
201An exception occurred when decompiling this method (06001AB8)
202
203ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Chest::Lock(System.Int32,System.Int32)
204
205 ---> System.Exception: Basic block has to end with unconditional control flow.
206{
207 IL_0003:
208 stloc:uint16(var_5_0A, callgetter:uint16(Tile::get_type, ldloc:Tile[exp:valuetype Terraria.Tile&](var_4)))
209 call:void(AchievementsHelper::NotifyProgressionEvent, ldc.i4:int32(20))
210 stloc:uint16(var_12_2C, callgetter:uint16(Tile::get_type, ldloc:Tile[exp:valuetype Terraria.Tile&](var_11)))
211}
212
213 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
214 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
215 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
216 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
217 --- End of inner exception stack trace ---
218 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
219 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
220*/;
221 }
222
223 // Token: 0x06001AB9 RID: 6841 RVA: 0x0006D2C8 File Offset: 0x0006B4C8
224 public static int UsingChest(int i)
225 {
226 /*
227An exception occurred when decompiling this method (06001AB9)
228
229ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Chest::UsingChest(System.Int32)
230
231 ---> System.Exception: Basic block has to end with unconditional control flow.
232{
233 Block_2:
234 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
235}
236
237 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
238 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
239 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
240 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
241 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
242 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
243 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
244 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
245 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
246 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
247 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
248 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
249 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
250 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
251 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
252 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
253 --- End of inner exception stack trace ---
254 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
255 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
256*/;
257 }
258
259 // Token: 0x06001ABA RID: 6842 RVA: 0x0006D2F0 File Offset: 0x0006B4F0
260 public static int FindChest(int X, int Y)
261 {
262 /*
263An exception occurred when decompiling this method (06001ABA)
264
265ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Chest::FindChest(System.Int32,System.Int32)
266
267 ---> System.Exception: Basic block has to end with unconditional control flow.
268{
269 IL_0013:
270 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
271}
272
273 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
274 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
275 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
276 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
277 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
278 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
279 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
280 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
281 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
282 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
283 --- End of inner exception stack trace ---
284 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
285 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
286*/;
287 }
288
289 // Token: 0x06001ABB RID: 6843 RVA: 0x0006D314 File Offset: 0x0006B514
290 public static int FindChestByGuessing(int X, int Y)
291 {
292 /*
293An exception occurred when decompiling this method (06001ABB)
294
295ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Chest::FindChestByGuessing(System.Int32,System.Int32)
296
297 ---> System.Exception: Basic block has to end with unconditional control flow.
298{
299 IL_0019:
300 brtrue(IL_0000, ldloc:int32[exp:bool](var_0_01))
301}
302
303 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
304 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
305 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
306 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
307 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
308 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
309 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
310 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
311 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
312 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
313 --- End of inner exception stack trace ---
314 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
315 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
316*/;
317 }
318
319 // Token: 0x06001ABC RID: 6844 RVA: 0x0006D33C File Offset: 0x0006B53C
320 public static int FindEmptyChest(int x, int y, int type = 21, int style = 0, int direction = 1, int alternate = 0)
321 {
322 int num = 1;
323 if (num == 0)
324 {
325 }
326 if (num != 0)
327 {
328 }
329 return 43139072;
330 }
331
332 // Token: 0x06001ABD RID: 6845 RVA: 0x0006D360 File Offset: 0x0006B560
333 public static bool NearOtherChests(int x, int y)
334 {
335 int num = 1;
336 bool flag = Framing.GetTileSafely(43139072, x).active();
337 if (num == 0)
338 {
339 }
340 if (num == 0)
341 {
342 return;
343 }
344 }
345
346 // Token: 0x06001ABE RID: 6846 RVA: 0x0006D38C File Offset: 0x0006B58C
347 public static int AfterPlacement_Hook(int x, int y, int type = 21, int style = 0, int direction = 1, int alternate = 0)
348 {
349 int num = 1;
350 long num2 = 0L;
351 if (num == 0)
352 {
353 }
354 int num3 = Chest.FindEmptyChest(43139072, type, x, (int)num2, style, direction);
355 if (num == 0)
356 {
357 }
359 if (num == 0)
360 {
361 }
362 return num3;
363 }
364
365 // Token: 0x06001ABF RID: 6847 RVA: 0x0006D3D4 File Offset: 0x0006B5D4
366 public static int CreateChest(int X, int Y, int id = -1)
367 {
368 int num = 1;
369 if (num == 0)
370 {
371 }
372 if (num == 0)
373 {
374 }
375 if (num == 0)
376 {
377 }
378 if (num == 0)
379 {
380 }
382 int num2;
383 return num2;
384 }
385
386 // Token: 0x06001AC0 RID: 6848 RVA: 0x0006D408 File Offset: 0x0006B608
387 public static bool CanDestroyChest(int X, int Y)
388 {
389 int num = 1;
390 if (num == 0)
391 {
392 }
393 if (num != 0)
394 {
395 return;
396 }
397 }
398
399 // Token: 0x06001AC1 RID: 6849 RVA: 0x0006D430 File Offset: 0x0006B630
400 public static bool DestroyChest(int X, int Y)
401 {
402 /*
403An exception occurred when decompiling this method (06001AC1)
404
405ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Chest::DestroyChest(System.Int32,System.Int32)
406
407 ---> System.Exception: Basic block has to end with unconditional control flow.
408{
409 IL_000D:
410 stloc:int32(var_6_1B, callgetter:int32(Main::get_myPlayer))
411 stloc:int32(var_8_25, callgetter:int32(Main::get_myPlayer))
412 call:void(Recipe::FindRecipes, ldc.i4:bool(0))
413}
414
415 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
416 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
417 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
418 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
419 --- End of inner exception stack trace ---
420 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
421 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
422*/;
423 }
424
425 // Token: 0x06001AC2 RID: 6850 RVA: 0x0006D46C File Offset: 0x0006B66C
426 public static void DestroyChestDirect(int X, int Y, int id)
427 {
428 int myPlayer = Main.myPlayer;
429 int myPlayer2 = Main.myPlayer;
430 long num = 0L;
431 Recipe.FindRecipes(num != 0L);
432 }
433
434 // Token: 0x06001AC3 RID: 6851 RVA: 0x0006D49C File Offset: 0x0006B69C
436 {
437 if (!true)
438 {
439 }
440 int num = Main.shopSellbackHelper.Remove(newItem);
441 int stack = newItem.stack;
442 Item[] array = this.item;
443 if (stack != 0 && stack != 0)
444 {
445 return;
446 }
448 if (item == null || item != null)
449 {
450 Item[] array2 = this.item;
451 int num2 = 1;
452 int stack2 = array2.stack;
453 array2.buyOnce = num2 != 0;
455 return;
456 }
457 throw new ArrayTypeMismatchException();
458 }
459
460 // Token: 0x06001AC4 RID: 6852 RVA: 0x0006D510 File Offset: 0x0006B710
461 public static void SetupTravelShop_AddToShop(int it, int added, int count)
462 {
463 if (it != 0)
464 {
465 if (4555 == 0)
466 {
467 }
468 return;
469 }
470 }
471
472 // Token: 0x06001AC5 RID: 6853 RVA: 0x0006D5A4 File Offset: 0x0006B7A4
473 public static bool SetupTravelShop_CanAddItemToShop(int it)
474 {
475 int num = 1;
476 if (num == 0)
477 {
478 }
479 if (num == 0)
480 {
481 return;
482 }
483 }
484
485 // Token: 0x06001AC6 RID: 6854 RVA: 0x0006D5C0 File Offset: 0x0006B7C0
486 public static void SetupTravelShop_GetPainting(Player playerWithHighestLuck, int[] rarity, int it, int minimumRarity = 0)
487 {
488 if (playerWithHighestLuck.RollLuck(rarity) == 0)
489 {
490 if (!true)
491 {
492 }
493 if (!true)
494 {
495 it.m_value = 5121;
496 }
497 }
498 if (playerWithHighestLuck.RollLuck(rarity) == 0)
499 {
500 if (5121 == 0)
501 {
502 }
503 if (5121 == 0)
504 {
505 it.m_value = 5122;
506 }
507 }
508 if (playerWithHighestLuck.RollLuck(rarity) == 0)
509 {
510 if (5122 == 0)
511 {
512 }
513 if (5122 == 0)
514 {
515 it.m_value = 5124;
516 }
517 }
518 if (playerWithHighestLuck.RollLuck(rarity) == 0)
519 {
520 if (5124 == 0)
521 {
522 }
523 if (5124 == 0)
524 {
525 it.m_value = 5123;
526 }
527 }
528 if (playerWithHighestLuck.RollLuck(rarity) == 0)
529 {
530 if (5242 == 0)
531 {
532 }
533 while (5242 == 0)
534 {
535 }
536 if (5242 == 0)
537 {
538 }
539 while (5242 == 0)
540 {
541 }
542 it.m_value = 3596;
543 return;
544 }
545 if (playerWithHighestLuck.RollLuck(rarity) == 0)
546 {
547 if (3596 == 0)
548 {
549 }
550 while (3596 == 0)
551 {
552 }
553 if (3596 == 0)
554 {
555 }
556 while (3596 == 0)
557 {
558 }
559 it.m_value = 2865;
560 return;
561 }
562 if (playerWithHighestLuck.RollLuck(rarity) == 0)
563 {
564 if (2865 == 0)
565 {
566 }
567 while (2865 == 0)
568 {
569 }
570 if (2865 == 0)
571 {
572 }
573 while (2865 == 0)
574 {
575 }
576 it.m_value = 2866;
577 return;
578 }
579 if (playerWithHighestLuck.RollLuck(rarity) == 0)
580 {
581 if (2866 == 0)
582 {
583 }
584 while (2866 == 0)
585 {
586 }
587 if (2866 == 0)
588 {
589 }
590 while (2866 == 0)
591 {
592 }
593 it.m_value = 2867;
594 return;
595 }
596 if (playerWithHighestLuck.RollLuck(rarity) == 0)
597 {
598 if (5123 == 0)
599 {
600 }
601 if (5123 != 0)
602 {
603 it.m_value = 3055;
604 }
605 }
606 if (playerWithHighestLuck.RollLuck(rarity) == 0)
607 {
608 if (3055 == 0)
609 {
610 }
611 if (3055 != 0)
612 {
613 it.m_value = 3056;
614 }
615 }
616 if (playerWithHighestLuck.RollLuck(rarity) == 0)
617 {
618 if (3056 == 0)
619 {
620 }
621 if (3056 != 0)
622 {
623 it.m_value = 3057;
624 }
625 }
626 if (playerWithHighestLuck.RollLuck(rarity) == 0)
627 {
628 if (3057 == 0)
629 {
630 }
631 if (3057 != 0)
632 {
633 it.m_value = 3058;
634 }
635 }
636 if (playerWithHighestLuck.RollLuck(rarity) == 0)
637 {
638 if (3058 == 0)
639 {
640 }
641 if (3058 != 0)
642 {
643 it.m_value = 3059;
644 }
645 }
646 if (playerWithHighestLuck.RollLuck(rarity) != 0)
647 {
648 if (playerWithHighestLuck.RollLuck(rarity) == 0)
649 {
650 if (3059 == 0)
651 {
652 }
653 if (3059 != 0)
654 {
655 it.m_value = 5121;
656 }
657 }
658 if (playerWithHighestLuck.RollLuck(rarity) == 0)
659 {
660 if (5121 == 0)
661 {
662 }
663 if (5121 != 0)
664 {
665 it.m_value = 5122;
666 }
667 }
668 if (playerWithHighestLuck.RollLuck(rarity) == 0)
669 {
670 if (5122 == 0)
671 {
672 }
673 if (5122 != 0)
674 {
675 it.m_value = 5124;
676 }
677 }
678 if (playerWithHighestLuck.RollLuck(rarity) == 0)
679 {
680 if (5124 == 0)
681 {
682 }
683 if (5124 != 0)
684 {
685 it.m_value = 5123;
686 }
687 }
688 if (playerWithHighestLuck.RollLuck(rarity) == 0)
689 {
690 it.m_value = 5225;
691 }
692 if (playerWithHighestLuck.RollLuck(rarity) == 0)
693 {
694 it.m_value = 5229;
695 }
696 if (playerWithHighestLuck.RollLuck(rarity) == 0)
697 {
698 it.m_value = 5232;
699 }
700 if (playerWithHighestLuck.RollLuck(rarity) == 0)
701 {
702 it.m_value = 5389;
703 }
704 if (playerWithHighestLuck.RollLuck(rarity) == 0)
705 {
706 it.m_value = 5233;
707 }
708 if (playerWithHighestLuck.RollLuck(rarity) == 0)
709 {
710 it.m_value = 5241;
711 }
712 if (playerWithHighestLuck.RollLuck(rarity) == 0)
713 {
714 it.m_value = 5244;
715 }
716 if (playerWithHighestLuck.RollLuck(rarity) == 0)
717 {
718 it.m_value = 5242;
719 }
720 return;
721 }
722 if (2867 == 0)
723 {
724 }
725 while (2867 == 0)
726 {
727 }
728 if (2867 == 0)
729 {
730 }
731 while (2867 == 0)
732 {
733 }
734 it.m_value = 5243;
735 }
736
737 // Token: 0x06001AC7 RID: 6855 RVA: 0x0006D924 File Offset: 0x0006BB24
738 public static void SetupTravelShop_AdjustSlotRarities(int slotItemAttempts, int[] rarity)
739 {
740 }
741
742 // Token: 0x06001AC8 RID: 6856 RVA: 0x0006D934 File Offset: 0x0006BB34
743 public static void SetupTravelShop_GetItem(Player playerWithHighestLuck, int[] rarity, int it, int minimumRarity = 0)
744 {
745 if (playerWithHighestLuck.RollLuck(rarity) == 0)
746 {
747 int num = 3309;
748 it.m_value = num;
749 }
750 if (playerWithHighestLuck.RollLuck(rarity) == 0)
751 {
752 int num2 = 3314;
754 }
755 int num3;
756 if (playerWithHighestLuck.RollLuck(rarity) == 0)
757 {
758 num3 = 1987;
760 }
761 int num4;
762 if (playerWithHighestLuck.RollLuck(rarity) == 0)
763 {
764 if (num3 == 0)
765 {
766 }
767 if (num3 != 0)
768 {
769 num4 = 2270;
771 }
772 }
773 if (playerWithHighestLuck.RollLuck(rarity) == 0)
774 {
775 if (num4 == 0)
776 {
777 }
778 if (num4 != 0)
779 {
780 int num5 = 4760;
782 }
783 }
784 if (playerWithHighestLuck.RollLuck(rarity) == 0)
785 {
786 int num6 = 2278;
788 }
789 if (playerWithHighestLuck.RollLuck(rarity) == 0)
790 {
791 int num7 = 2271;
793 }
794 int num82;
795 int num97;
796 if (playerWithHighestLuck.RollLuck(rarity) != 0)
797 {
798 if (playerWithHighestLuck.RollLuck(rarity) == 0)
799 {
800 int num8 = 2272;
802 }
803 if (playerWithHighestLuck.RollLuck(rarity) == 0)
804 {
805 int num9 = 2276;
807 }
808 if (playerWithHighestLuck.RollLuck(rarity) == 0)
809 {
810 int num10 = 2284;
812 }
813 if (playerWithHighestLuck.RollLuck(rarity) == 0)
814 {
815 int num11 = 2285;
817 }
818 if (playerWithHighestLuck.RollLuck(rarity) == 0)
819 {
820 int num12 = 2286;
822 }
823 if (playerWithHighestLuck.RollLuck(rarity) == 0)
824 {
825 int num13 = 2287;
827 }
828 int num14;
829 if (playerWithHighestLuck.RollLuck(rarity) == 0)
830 {
831 num14 = 4744;
833 }
834 if (playerWithHighestLuck.RollLuck(rarity) == 0)
835 {
836 if (num14 == 0)
837 {
838 }
839 if (num14 != 0)
840 {
841 int num15 = 2296;
843 }
844 }
845 int num16;
846 if (playerWithHighestLuck.RollLuck(rarity) == 0)
847 {
848 num16 = 3628;
850 }
851 if (playerWithHighestLuck.RollLuck(rarity) == 0)
852 {
853 if (num16 == 0)
854 {
855 }
856 if (num16 != 0)
857 {
858 int num17 = 4091;
860 }
861 }
862 if (playerWithHighestLuck.RollLuck(rarity) == 0)
863 {
864 int num18 = 4603;
866 }
867 if (playerWithHighestLuck.RollLuck(rarity) == 0)
868 {
869 int num19 = 4604;
871 }
872 if (playerWithHighestLuck.RollLuck(rarity) == 0)
873 {
874 int num20 = 5297;
876 }
877 if (playerWithHighestLuck.RollLuck(rarity) == 0)
878 {
879 int num21 = 4605;
881 }
882 if (playerWithHighestLuck.RollLuck(rarity) == 0)
883 {
884 int num22 = 4550;
886 }
887 int num23;
888 if (playerWithHighestLuck.RollLuck(rarity) == 0)
889 {
890 num23 = 2268;
892 }
893 int num24;
894 if (num24 == 0)
895 {
896 if (num23 == 0)
897 {
898 }
899 if (num23 != 0)
900 {
901 int num25 = 2269;
903 }
904 }
905 int num26;
906 if (num26 == 0)
907 {
908 int num27 = 1988;
910 }
911 int num28;
912 if (num28 == 0)
913 {
914 int num29 = 2275;
916 }
917 int num30;
918 if (num30 == 0)
919 {
920 int num31 = 2279;
922 }
923 int num32;
924 if (num32 == 0)
925 {
926 int num33 = 2277;
928 }
929 int num34;
930 if (num34 == 0)
931 {
932 int num35 = 4555;
934 }
935 int num36;
936 if (num36 == 0)
937 {
938 int num37 = 4321;
940 }
941 int num38;
942 if (num38 == 0)
943 {
944 int num39 = 4323;
946 }
947 int num40;
948 if (num40 == 0)
949 {
950 int num41 = 5390;
952 }
953 int num42;
954 if (num42 == 0)
955 {
956 int num43 = 4549;
958 }
959 int num44;
960 if (num44 == 0)
961 {
962 int num45 = 4561;
964 }
965 int num46;
966 if (num46 == 0)
967 {
968 int num47 = 4774;
970 }
971 int num48;
972 if (num48 == 0)
973 {
974 int num49 = 5136;
976 }
977 int num50;
978 if (num50 == 0)
979 {
980 int num51 = 5305;
982 }
983 int num52;
984 if (num52 == 0)
985 {
986 int num53 = 4562;
988 }
989 int num54;
990 if (num54 == 0)
991 {
992 int num55 = 4558;
994 }
995 int num56;
996 if (num56 == 0)
997 {
998 int num57 = 4559;
1000 }
1001 int num58;
1002 if (num58 == 0)
1003 {
1004 int num59 = 4563;
1005 it.m_value = num59;
1006 }
1007 int num60;
1008 int num61;
1009 if (num60 == 0)
1010 {
1011 num61 = 4666;
1012 it.m_value = num61;
1013 }
1014 int num62;
1015 int num64;
1016 if (num62 == 0)
1017 {
1018 if (num61 == 0)
1019 {
1020 }
1021 int num63 = 4347;
1022 it.m_value = num63;
1023 if (num63 == 0)
1024 {
1025 }
1026 if (num63 != 0)
1027 {
1028 num64 = 4348;
1029 it.m_value = num64;
1030 }
1031 }
1032 int num65;
1033 int num66;
1034 if (num65 == 0)
1035 {
1036 if (num64 == 0)
1037 {
1038 }
1039 if (num64 != 0)
1040 {
1041 num66 = 3262;
1042 it.m_value = num66;
1043 }
1044 }
1045 int num67;
1046 if (num67 == 0)
1047 {
1048 if (num66 == 0)
1049 {
1050 }
1051 if (num66 != 0)
1052 {
1053 int num68 = 3284;
1054 it.m_value = num68;
1055 }
1056 }
1057 int num69;
1058 if (num69 == 0)
1059 {
1060 int num70 = 2267;
1061 it.m_value = num70;
1062 }
1063 int num71;
1064 if (num71 == 0)
1065 {
1066 int num72 = 2214;
1067 it.m_value = num72;
1068 }
1069 int num73;
1070 if (num73 == 0)
1071 {
1072 int num74 = 2215;
1073 it.m_value = num74;
1074 }
1075 int num75;
1076 if (num75 == 0)
1077 {
1078 int num76 = 2216;
1079 it.m_value = num76;
1080 }
1081 int num77;
1082 if (num77 == 0)
1083 {
1084 int num78 = 2217;
1085 it.m_value = num78;
1086 }
1087 int num79;
1088 int num80;
1089 if (num79 == 0)
1090 {
1091 num80 = 3624;
1092 it.m_value = num80;
1093 }
1094 int num81;
1095 if (num81 == 0)
1096 {
1097 if (num80 == 0)
1098 {
1099 }
1100 num82 = 671;
1101 int num83 = 2273;
1102 it.m_value = num83;
1103 }
1104 int num84;
1105 if (num84 == 0)
1106 {
1107 int num85 = 2274;
1108 it.m_value = num85;
1109 }
1110 int num86;
1111 int num87;
1112 if (num86 == 0)
1113 {
1114 num87 = 2266;
1115 it.m_value = num87;
1116 }
1117 int num88;
1118 int num89;
1119 if (num88 == 0)
1120 {
1121 if (num87 == 0)
1122 {
1123 }
1124 num89 = 3;
1125 it.m_value = num87;
1126 }
1127 if (playerWithHighestLuck.RollLuck(num89) == 0)
1128 {
1129 int num90 = 2258;
1130 it.m_value = num90;
1131 }
1132 if (playerWithHighestLuck.RollLuck(num89) == 0)
1133 {
1134 int num91 = 2242;
1135 it.m_value = num91;
1136 }
1137 if (playerWithHighestLuck.RollLuck(num89) == 0)
1138 {
1139 int num92 = 2260;
1140 it.m_value = num92;
1141 }
1142 if (playerWithHighestLuck.RollLuck(num89) == 0)
1143 {
1144 int num93 = 3637;
1145 it.m_value = num93;
1146 }
1147 if (playerWithHighestLuck.RollLuck(num89) == 0)
1148 {
1149 int num94 = 4420;
1150 it.m_value = num94;
1151 }
1152 if (playerWithHighestLuck.RollLuck(num89) == 0)
1153 {
1154 int num95 = 3119;
1155 it.m_value = num95;
1156 }
1157 if (playerWithHighestLuck.RollLuck(num89) == 0)
1158 {
1159 int num96 = 3118;
1160 it.m_value = num96;
1161 }
1162 if (playerWithHighestLuck.RollLuck(num89) == 0)
1163 {
1164 num97 = 3099;
1165 it.m_value = num97;
1166 }
1167 return;
1168 }
1169 if (num97 == 0)
1170 {
1171 }
1172 while (num97 == 0)
1173 {
1174 }
1175 if (num97 == 0)
1176 {
1177 }
1178 while (num82 == 0)
1179 {
1180 }
1181 if (num82 == 0)
1182 {
1183 }
1184 while (num82 == 0)
1185 {
1186 }
1187 if (num82 == 0)
1188 {
1189 }
1190 int num98 = 2223;
1191 it.m_value = num98;
1192 }
1193
1194 // Token: 0x06001AC9 RID: 6857 RVA: 0x0006DF1C File Offset: 0x0006C11C
1195 public static void SetupTravelShop()
1196 {
1197 int num = 1;
1198 if (num == 0)
1199 {
1200 }
1201 long num2 = 0L;
1202 if (num == 0)
1203 {
1204 }
1205 if (num == 0 || num2 != 0L)
1206 {
1207 }
1208 if (num == 0)
1209 {
1210 }
1211 if (num == 0)
1212 {
1213 }
1214 bool expertMode = Main.expertMode;
1215 bool flag = Chest.SetupTravelShop_CanAddItemToShop(int.MinValue);
1216 }
1217
1218 // Token: 0x06001ACA RID: 6858 RVA: 0x0006DFC4 File Offset: 0x0006C1C4
1219 public void SetupShop(int type)
1220 {
1221 if (!true)
1222 {
1223 }
1225 Item[] array = this.item;
1226 }
1227
1228 // Token: 0x06001ACB RID: 6859 RVA: 0x000712A8 File Offset: 0x0006F4A8
1230 {
1231 if (!true)
1232 {
1233 }
1234 bool flag = Chest.DidDiscoverBestiaryEntry(585);
1235 if (!true)
1236 {
1237 }
1239 if (!true)
1240 {
1241 }
1242 return Chest.DidDiscoverBestiaryEntry(583);
1243 }
1244
1245 // Token: 0x06001ACC RID: 6860 RVA: 0x000712E0 File Offset: 0x0006F4E0
1246 private static bool DidDiscoverBestiaryEntry(int npcId)
1247 {
1248 /*
1249An exception occurred when decompiling this method (06001ACC)
1250
1251ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Chest::DidDiscoverBestiaryEntry(System.Int32)
1252
1253 ---> System.Exception: Basic block has to end with unconditional control flow.
1254{
1255 IL_0003:
1256 stloc:IBestiaryUICollectionInfoProvider(var_1_09, ldfld:IBestiaryUICollectionInfoProvider(BestiaryEntry::UIInfoProvider, ldloc:BestiaryEntry(var_0)))
1257}
1258
1259 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
1260 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
1261 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
1262 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
1263 --- End of inner exception stack trace ---
1264 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
1265 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
1266*/;
1267 }
1268
1269 // Token: 0x06001ACD RID: 6861 RVA: 0x000712F8 File Offset: 0x0006F4F8
1270 public static void AskForChestToEatItem(Vector2 worldPosition, int duration)
1271 {
1272 if (!true)
1273 {
1274 }
1275 }
1276
1277 // Token: 0x06001ACE RID: 6862 RVA: 0x0007130C File Offset: 0x0006F50C
1278 public static void UpdateChestFrames()
1279 {
1280 int num = 1;
1281 if (num == 0)
1282 {
1283 }
1284 if (num == 0)
1285 {
1286 }
1287 if (num != 0)
1288 {
1289 }
1290 }
1291
1292 // Token: 0x06001ACF RID: 6863 RVA: 0x0007135C File Offset: 0x0006F55C
1293 public void FixLoadedData()
1294 {
1295 long entityId = this.item.entityId;
1296 }
1297
1298 // Token: 0x06001AD0 RID: 6864 RVA: 0x00071378 File Offset: 0x0006F578
1299 // Note: this type is marked as 'beforefieldinit'.
1300 static Chest()
1301 {
1302 }
1303
1304 // Token: 0x040027EF RID: 10223
1306
1307 // Token: 0x040027F0 RID: 10224
1308 public const float chestStackRange = 600f;
1309
1310 // Token: 0x040027F1 RID: 10225
1311 public const int maxChestTypes = 52;
1312
1313 // Token: 0x040027F2 RID: 10226
1314 public static int[] chestTypeToIcon;
1315
1316 // Token: 0x040027F3 RID: 10227
1317 public static int[] chestItemSpawn;
1318
1319 // Token: 0x040027F4 RID: 10228
1320 public const int maxChestTypes2 = 17;
1321
1322 // Token: 0x040027F5 RID: 10229
1323 public static int[] chestTypeToIcon2;
1324
1325 // Token: 0x040027F6 RID: 10230
1326 public static int[] chestItemSpawn2;
1327
1328 // Token: 0x040027F7 RID: 10231
1329 public const int maxDresserTypes = 43;
1330
1331 // Token: 0x040027F8 RID: 10232
1332 public static int[] dresserTypeToIcon;
1333
1334 // Token: 0x040027F9 RID: 10233
1335 public static int[] dresserItemSpawn;
1336
1337 // Token: 0x040027FA RID: 10234
1338 public const int maxItems = 40;
1339
1340 // Token: 0x040027FB RID: 10235
1341 public const int MaxNameLength = 29;
1342
1343 // Token: 0x040027FC RID: 10236
1344 public Item[] item;
1345
1346 // Token: 0x040027FD RID: 10237
1347 public int x;
1348
1349 // Token: 0x040027FE RID: 10238
1350 public int y;
1351
1352 // Token: 0x040027FF RID: 10239
1353 public bool bankChest;
1354
1355 // Token: 0x04002800 RID: 10240
1356 public string name;
1357
1358 // Token: 0x04002801 RID: 10241
1359 public int frameCounter;
1360
1361 // Token: 0x04002802 RID: 10242
1362 public int frame;
1363
1364 // Token: 0x04002803 RID: 10243
1366
1367 // Token: 0x04002804 RID: 10244
1368 private static Item[] bartenderResort;
1369
1370 // Token: 0x04002805 RID: 10245
1371 private static int forcedDDTier;
1372 }
1373}
class f__AnonymousType0<< Count > j__TPar
static Item[] bartenderResort
Definition Chest.cs:1368
static int UsingChest(int i)
Definition Chest.cs:224
static bool DestroyChest(int X, int Y)
Definition Chest.cs:400
static int[] dresserTypeToIcon
Definition Chest.cs:1332
static void AskForChestToEatItem(Vector2 worldPosition, int duration)
Definition Chest.cs:1270
static int forcedDDTier
Definition Chest.cs:1371
Chest(bool bank=false)
Definition Chest.cs:12
void AddItemToShop(Item newItem)
Definition Chest.cs:435
static void UpdateChestFrames()
Definition Chest.cs:1278
override string ToString()
Definition Chest.cs:17
static int[] dresserItemSpawn
Definition Chest.cs:1335
void SetupShop(int type)
Definition Chest.cs:1219
static bool BestiaryGirl_IsFairyTorchAvailable()
Definition Chest.cs:1229
static void SetupTravelShop_GetItem(Player playerWithHighestLuck, int[] rarity, int it, int minimumRarity=0)
Definition Chest.cs:743
static int[] chestTypeToIcon2
Definition Chest.cs:1323
static int FindChestByGuessing(int X, int Y)
Definition Chest.cs:290
static bool IsLocked(int x, int y)
Definition Chest.cs:75
const int MaxNameLength
Definition Chest.cs:1341
object Clone()
Definition Chest.cs:165
static int[] chestItemSpawn
Definition Chest.cs:1317
void FixLoadedData()
Definition Chest.cs:1293
const int maxDresserTypes
Definition Chest.cs:1329
static int[] chestTypeToIcon
Definition Chest.cs:1314
static int CreateChest(int X, int Y, int id=-1)
Definition Chest.cs:366
Item[] item
Definition Chest.cs:1344
static bool SetupTravelShop_CanAddItemToShop(int it)
Definition Chest.cs:473
static bool IsLocked(Tile t)
Definition Chest.cs:85
static Item PutItemInNearbyChest(Item item, Vector2 position)
Definition Chest.cs:98
static int[] chestItemSpawn2
Definition Chest.cs:1326
static void VisualizeChestTransfer_CoinsBatch(Vector2 position, Vector2 chestPosition, long coinsMoved)
Definition Chest.cs:150
int frameCounter
Definition Chest.cs:1359
static void ServerPlaceItem(int plr, int slot)
Definition Chest.cs:90
string name
Definition Chest.cs:1356
const float chestStackRange
Definition Chest.cs:1308
static int AfterPlacement_Hook(int x, int y, int type=21, int style=0, int direction=1, int alternate=0)
Definition Chest.cs:347
static int FindEmptyChest(int x, int y, int type=21, int style=0, int direction=1, int alternate=0)
Definition Chest.cs:320
static void Initialize()
Definition Chest.cs:24
static void SetupTravelShop_AdjustSlotRarities(int slotItemAttempts, int[] rarity)
Definition Chest.cs:738
static void VisualizeChestTransfer(Vector2 position, Vector2 chestPosition, Item item, int amountMoved)
Definition Chest.cs:145
static bool DidDiscoverBestiaryEntry(int npcId)
Definition Chest.cs:1246
static bool NearOtherChests(int x, int y)
Definition Chest.cs:333
static void SetupTravelShop()
Definition Chest.cs:1195
bool bankChest
Definition Chest.cs:1353
static bool Unlock(int X, int Y)
Definition Chest.cs:171
int eatingAnimationTime
Definition Chest.cs:1365
static int FindChest(int X, int Y)
Definition Chest.cs:260
static void DestroyChestDirect(int X, int Y, int id)
Definition Chest.cs:426
const int maxChestTypes2
Definition Chest.cs:1320
static HashSet< int > _chestInUse
Definition Chest.cs:1305
static void SetupTravelShop_GetPainting(Player playerWithHighestLuck, int[] rarity, int it, int minimumRarity=0)
Definition Chest.cs:486
static bool CanDestroyChest(int X, int Y)
Definition Chest.cs:387
static void SetupTravelShop_AddToShop(int it, int added, int count)
Definition Chest.cs:461
const int maxItems
Definition Chest.cs:1338
static List< int > GetCurrentlyOpenChests()
Definition Chest.cs:45
static Chest()
Definition Chest.cs:1300
const int maxChestTypes
Definition Chest.cs:1311
static bool Lock(int X, int Y)
Definition Chest.cs:198
static bool IsPlayerInChest(int i)
Definition Chest.cs:32
static Tile GetTileSafely(Vector2 position)
Definition Framing.cs:356
Item Clone()
Definition Item.cs:1708
static ItemShopSellbackHelper shopSellbackHelper
Definition Main.cs:2589
static int myPlayer
Definition Main.cs:2337
static bool expertMode
Definition Main.cs:4186
static bool NetClientOnly
Definition Main.cs:5407
static Player LocalPlayer
Definition Main.cs:5267
ShoppingSettings currentShoppingSettings
Definition Player.cs:23141
static void FindRecipes(bool canDelayCheck=false)
Definition Recipe.cs:204
bool active()
Definition Tile.cs:1241