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
CustomCurrencyManager.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x02000A5C RID: 2652
12 {
13 // Token: 0x06004E68 RID: 20072 RVA: 0x002769A0 File Offset: 0x00274BA0
14 public static void Initialize()
15 {
16 if (!true)
17 {
18 }
19 }
20
21 // Token: 0x06004E69 RID: 20073 RVA: 0x002769B0 File Offset: 0x00274BB0
23 {
24 /*
25An exception occurred when decompiling this method (06004E69)
26
27ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.UI.CustomCurrencyManager::RegisterCurrency(Terraria.GameContent.UI.CustomCurrencySystem)
28
29 ---> System.Exception: Basic block has to end with unconditional control flow.
30{
31 IL_0000:
32 brtrue(IL_0000, ldc.i4:bool(1))
33}
34
35 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
36 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
37 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
38 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
39 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
40 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
41 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
42 --- End of inner exception stack trace ---
43 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
44 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
45*/;
46 }
47
48 // Token: 0x06004E6A RID: 20074 RVA: 0x002769C0 File Offset: 0x00274BC0
49 public static long GetCurrencyCount(int currencyIndex)
50 {
51 /*
52An exception occurred when decompiling this method (06004E6A)
53
54ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int64 Terraria.GameContent.UI.CustomCurrencyManager::GetCurrencyCount(System.Int32)
55
56 ---> System.Exception: Basic block has to end with unconditional control flow.
57{
58 IL_0003:
59 stloc:int32(var_1_0A, callgetter:int32(Main::get_myPlayer))
60}
61
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 1852
63 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
64 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
65 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
66 --- End of inner exception stack trace ---
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 92
68 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
69*/;
70 }
71
72 // Token: 0x06004E6B RID: 20075 RVA: 0x002769DC File Offset: 0x00274BDC
73 public static void DrawSavings(SpriteBatch sb, int currencyIndex, float shopx, float shopy, bool horizontal = false)
74 {
75 if (!true)
76 {
77 }
78 if ("Only TraceListeners can be added to a TraceListenerCollection." == null)
79 {
80 }
81 int myPlayer = Main.myPlayer;
82 if ("Only TraceListeners can be added to a TraceListenerCollection." == null)
83 {
84 }
85 int num = 17036;
86 if (num == 0)
87 {
88 }
89 if (num == 0)
90 {
91 }
92 int num2 = 1;
93 if (num2 == 0)
94 {
95 }
96 int value = num2.m_value;
97 }
98
99 // Token: 0x06004E6C RID: 20076 RVA: 0x00276A44 File Offset: 0x00274C44
100 public static void GetPriceText(int currencyIndex, string[] lines, int currentLine, long price)
101 {
102 if (!true)
103 {
104 }
105 }
106
107 // Token: 0x06004E6D RID: 20077 RVA: 0x00276A54 File Offset: 0x00274C54
108 public static bool CanAffordItem(Player player, long price, int currencyIndex)
109 {
110 if (!true)
111 {
112 return;
113 }
114 }
115
116 // Token: 0x06004E6E RID: 20078 RVA: 0x00276A68 File Offset: 0x00274C68
117 public static bool BuyItem(Player player, long price, int currencyIndex)
118 {
119 if (!true)
120 {
121 return;
122 }
123 }
124
125 // Token: 0x06004E6F RID: 20079 RVA: 0x000021DB File Offset: 0x000003DB
127 {
128 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
129 }
130
131 // Token: 0x06004E70 RID: 20080 RVA: 0x00276A88 File Offset: 0x00274C88
132 public static bool IsCustomCurrency(Item item)
133 {
134 if (!true)
135 {
136 }
137 throw new OutOfMemoryException();
138 }
139
140 // Token: 0x06004E71 RID: 20081 RVA: 0x00276AA8 File Offset: 0x00274CA8
141 public static void GetPrices(Item item, [Out] long calcForSelling, [Out] long calcForBuying)
142 {
143 if (!true)
144 {
145 }
146 int shopSpecialCurrency = item.shopSpecialCurrency;
147 }
148
149 // Token: 0x06004E72 RID: 20082 RVA: 0x00276AC0 File Offset: 0x00274CC0
151 {
152 }
153
154 // Token: 0x06004E73 RID: 20083 RVA: 0x00276AD4 File Offset: 0x00274CD4
155 // Note: this type is marked as 'beforefieldinit'.
157 {
158 }
159
160 // Token: 0x040086F9 RID: 34553
161 private static int _nextCurrencyIndex;
162
163 // Token: 0x040086FA RID: 34554
165 }
166}
class f__AnonymousType0<< Count > j__TPar
static void GetPrices(Item item, [Out] long calcForSelling, [Out] long calcForBuying)
static void GetPriceText(int currencyIndex, string[] lines, int currentLine, long price)
static void DrawSavings(SpriteBatch sb, int currencyIndex, float shopx, float shopy, bool horizontal=false)
static void FindEmptySlots(List< Item[]> inventories, Dictionary< int, List< int > > slotsToIgnore, List< Point > emptySlots, int currentInventoryIndex)
static bool BuyItem(Player player, long price, int currencyIndex)
static Dictionary< int, CustomCurrencySystem > _currencies
static int RegisterCurrency(CustomCurrencySystem collection)
static bool CanAffordItem(Player player, long price, int currencyIndex)
static int myPlayer
Definition Main.cs:2337