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
ItemsSacrificedUnlocksTracker.cs
Go to the documentation of this file.
1using System;
3using System.IO;
7
9{
10 // Token: 0x02000A15 RID: 2581
12 {
13 // Token: 0x17000876 RID: 2166
14 // (get) Token: 0x06004C31 RID: 19505 RVA: 0x00271668 File Offset: 0x0026F868
15 // (set) Token: 0x06004C32 RID: 19506 RVA: 0x0027167C File Offset: 0x0026F87C
16 public int LastEditId
17 {
19 get
20 {
21 return this.<LastEditId>k__BackingField;
22 }
24 private set
25 {
27 }
28 }
29
30 // Token: 0x06004C33 RID: 19507 RVA: 0x00271690 File Offset: 0x0026F890
34
35 // Token: 0x06004C34 RID: 19508 RVA: 0x002716A4 File Offset: 0x0026F8A4
36 public int GetSacrificeCount(int itemId)
37 {
38 /*
39An exception occurred when decompiling this method (06004C34)
40
41ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.Creative.ItemsSacrificedUnlocksTracker::GetSacrificeCount(System.Int32)
42
43 ---> System.Exception: Basic block has to end with unconditional control flow.
44{
45 IL_0003:
46 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<int32, int32>(var_0_09, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<int32, int32>(ItemsSacrificedUnlocksTracker::SacrificesCountByItemIdCache, ldloc:ItemsSacrificedUnlocksTracker(this)))
47}
48
49 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
50 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
51 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
52 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
53 --- End of inner exception stack trace ---
54 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
55 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
56*/;
57 }
58
59 // Token: 0x06004C35 RID: 19509 RVA: 0x000021DB File Offset: 0x000003DB
61 {
62 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
63 }
64
65 // Token: 0x06004C36 RID: 19510 RVA: 0x002716BC File Offset: 0x0026F8BC
66 public bool TryGetSacrificeNumbers(int itemId, [Out] int amountWeHave, [Out] int amountNeededTotal)
67 {
68 if (!true)
69 {
70 }
72 return true;
73 }
74
75 // Token: 0x06004C37 RID: 19511 RVA: 0x002716D8 File Offset: 0x0026F8D8
87
88 // Token: 0x06004C38 RID: 19512 RVA: 0x0027170C File Offset: 0x0026F90C
90 {
91 if (!true)
92 {
93 }
95 if (sacrificeCountByItemPersistentId == null)
96 {
97 }
100 int num = this.<LastEditId>k__BackingField;
101 this.<LastEditId>k__BackingField = num;
102 }
103
104 // Token: 0x06004C39 RID: 19513 RVA: 0x00271744 File Offset: 0x0026F944
109
110 // Token: 0x06004C3A RID: 19514 RVA: 0x00271770 File Offset: 0x0026F970
112 {
113 }
114
115 // Token: 0x06004C3B RID: 19515 RVA: 0x0027178C File Offset: 0x0026F98C
117 {
118 }
119
120 // Token: 0x06004C3C RID: 19516 RVA: 0x0027179C File Offset: 0x0026F99C
128
129 // Token: 0x06004C3D RID: 19517 RVA: 0x002717C8 File Offset: 0x0026F9C8
131 {
132 }
133
134 // Token: 0x06004C3E RID: 19518 RVA: 0x002717D8 File Offset: 0x0026F9D8
135 public void MarkContentsDirty()
136 {
137 int num = this.<LastEditId>k__BackingField;
138 this.<LastEditId>k__BackingField = num;
139 }
140
141 // Token: 0x0400864E RID: 34382
142 public const int POSITIVE_SACRIFICE_COUNT_CAP = 9999;
143
144 // Token: 0x0400864F RID: 34383
146
147 // Token: 0x04008650 RID: 34384
149
150 // Token: 0x04008651 RID: 34385
152 private int <LastEditId>k__BackingField;
153 }
154}
class f__AnonymousType0<< Count > j__TPar
void ValidateWorld(BinaryReader reader, int gameVersionSaveWasMadeOn)
void Load(BinaryReader reader, int gameVersionSaveWasMadeOn)
void SetSacrificeCountDirectly(string persistentId, int sacrificeCount)
bool TryGetSacrificeNumbers(int itemId, [Out] int amountWeHave, [Out] int amountNeededTotal)