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
TownRoomManager.cs
Go to the documentation of this file.
1using System;
3using System.IO;
8
10{
11 // Token: 0x02000801 RID: 2049
12 public class TownRoomManager
13 {
14 // Token: 0x060041AA RID: 16810 RVA: 0x00248648 File Offset: 0x00246848
15 public void AddOccupantsToList(int x, int y, List<int> occupantsList)
16 {
17 }
18
19 // Token: 0x060041AB RID: 16811 RVA: 0x000021DB File Offset: 0x000003DB
20 public void AddOccupantsToList(Point tilePosition, List<int> occupants)
21 {
22 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
23 }
24
25 // Token: 0x060041AC RID: 16812 RVA: 0x00248658 File Offset: 0x00246858
26 public bool HasRoomQuick(int npcID)
27 {
28 /*
29An exception occurred when decompiling this method (060041AC)
30
31ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.TownRoomManager::HasRoomQuick(System.Int32)
32
33 ---> System.Exception: Basic block has to end with unconditional control flow.
34{
35 Block_0:
36 stloc:bool[](var_0_06, ldfld:bool[](TownRoomManager::_hasRoom, ldloc:TownRoomManager(this)))
37}
38
39 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
40 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
41 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
42 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
43 --- End of inner exception stack trace ---
44 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
45 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
46*/;
47 }
48
49 // Token: 0x060041AD RID: 16813 RVA: 0x0024866C File Offset: 0x0024686C
50 public bool HasRoom(int npcID, [Out] Point roomPosition)
51 {
52 if (this._hasRoom != null)
53 {
55 }
56 throw new OutOfMemoryException();
57 }
58
59 // Token: 0x060041AE RID: 16814 RVA: 0x002486A0 File Offset: 0x002468A0
60 public void SetRoom(int npcID, int x, int y)
61 {
62 bool[] hasRoom = this._hasRoom;
63 }
64
65 // Token: 0x060041AF RID: 16815 RVA: 0x000021DB File Offset: 0x000003DB
66 public void SetRoom(int npcID, Point pt)
67 {
68 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
69 }
70
71 // Token: 0x060041B0 RID: 16816 RVA: 0x002486B8 File Offset: 0x002468B8
72 public void KickOut(NPC n)
73 {
74 int type = n.type;
75 this.KickOut(type);
76 bool[] hasRoom = this._hasRoom;
77 }
78
79 // Token: 0x060041B1 RID: 16817 RVA: 0x002486DC File Offset: 0x002468DC
80 public void KickOut(int npcType)
81 {
82 if (!true)
83 {
84 }
86 if (!false)
87 {
88 return;
89 }
90 throw new OutOfMemoryException();
91 }
92
93 // Token: 0x060041B2 RID: 16818 RVA: 0x00248714 File Offset: 0x00246914
98
99 // Token: 0x060041B3 RID: 16819 RVA: 0x00248740 File Offset: 0x00246940
100 public void Save(BinaryWriter writer)
101 {
102 if (!true)
103 {
104 }
105 int size = this._roomLocationPairs._size;
107 }
108
109 // Token: 0x060041B4 RID: 16820 RVA: 0x000021DB File Offset: 0x000003DB
110 public void Load(BinaryReader reader)
111 {
112 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
113 }
114
115 // Token: 0x060041B5 RID: 16821 RVA: 0x000021DB File Offset: 0x000003DB
116 public void Clear()
117 {
118 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
119 }
120
121 // Token: 0x060041B6 RID: 16822 RVA: 0x002487A0 File Offset: 0x002469A0
122 public byte GetHouseholdStatus(NPC n)
123 {
124 while (!n.homeless)
125 {
126 }
127 }
128
129 // Token: 0x060041B7 RID: 16823 RVA: 0x002487B8 File Offset: 0x002469B8
131 {
132 if (!true)
133 {
134 }
135 int housingCategory = npc2.housingCategory;
136 return true;
137 }
138
139 // Token: 0x060041B8 RID: 16824 RVA: 0x002487D4 File Offset: 0x002469D4
141 {
142 /*
143An exception occurred when decompiling this method (060041B8)
144
145ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.TownRoomManager::CanNPCsLiveWithEachOther(Terraria.NPC,Terraria.NPC)
146
147 ---> System.Exception: Basic block has to end with unconditional control flow.
148{
149 Block_0:
150 stloc:int32(var_0_06, ldfld:int32(NPC::housingCategory, ldloc:NPC(npc1)))
151 stloc:int32(var_1_0D, ldfld:int32(NPC::housingCategory, ldloc:NPC(npc2)))
152}
153
154 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
155 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
156 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
157 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
158 --- End of inner exception stack trace ---
159 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
160 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
161*/;
162 }
163
164 // Token: 0x060041B9 RID: 16825 RVA: 0x002487F0 File Offset: 0x002469F0
166 {
167 /*
168An exception occurred when decompiling this method (060041B9)
169
170ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.TownRoomManager::CanNPCsLiveWithEachOther_ShopHelper(Terraria.NPC,Terraria.NPC)
171
172 ---> System.Exception: Basic block has to end with unconditional control flow.
173{
174 Block_0:
175 stloc:int32(var_0_06, ldfld:int32(NPC::housingCategory, ldloc:NPC(npc1)))
176 stloc:int32(var_1_0D, ldfld:int32(NPC::housingCategory, ldloc:NPC(npc2)))
177}
178
179 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
180 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
181 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
182 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
183 --- End of inner exception stack trace ---
184 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
185 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
186*/;
187 }
188
189 // Token: 0x060041BA RID: 16826 RVA: 0x0024880C File Offset: 0x00246A0C
191 {
192 }
193
194 // Token: 0x060041BB RID: 16827 RVA: 0x00248820 File Offset: 0x00246A20
195 // Note: this type is marked as 'beforefieldinit'.
197 {
198 }
199
200 // Token: 0x04008084 RID: 32900
201 public static object EntityCreationLock;
202
203 // Token: 0x04008085 RID: 32901
205
206 // Token: 0x04008086 RID: 32902
207 private bool[] _hasRoom;
208
209 // Token: 0x02000802 RID: 2050
211 private sealed class <>c__DisplayClass8_0
212 {
213 // Token: 0x060041BC RID: 16828 RVA: 0x00248830 File Offset: 0x00246A30
215 {
216 }
217
218 // Token: 0x060041BD RID: 16829 RVA: 0x000021DB File Offset: 0x000003DB
220 {
221 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
222 }
223
224 // Token: 0x04008087 RID: 32903
225 public int npcID;
226 }
227
228 // Token: 0x02000803 RID: 2051
230 private sealed class <>c__DisplayClass10_0
231 {
232 // Token: 0x060041BE RID: 16830 RVA: 0x00248844 File Offset: 0x00246A44
234 {
235 }
236
237 // Token: 0x060041BF RID: 16831 RVA: 0x000021DB File Offset: 0x000003DB
239 {
240 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
241 }
242
243 // Token: 0x04008088 RID: 32904
244 public int npcType;
245 }
246 }
247}
class f__AnonymousType0<< Count > j__TPar
void AddOccupantsToList(Point tilePosition, List< int > occupants)
void SetRoom(int npcID, Point pt)
bool CanNPCsLiveWithEachOther(int npc1ByType, NPC npc2)
bool CanNPCsLiveWithEachOther(NPC npc1, NPC npc2)
void SetRoom(int npcID, int x, int y)
List< Tuple< int, Point > > _roomLocationPairs
void AddOccupantsToList(int x, int y, List< int > occupantsList)
bool CanNPCsLiveWithEachOther_ShopHelper(NPC npc1, NPC npc2)
bool HasRoom(int npcID, [Out] Point roomPosition)
bool homeless
Definition NPC.cs:11522