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
TEWeaponsRack.cs
Go to the documentation of this file.
1using System;
2using System.IO;
7
9{
10 // Token: 0x02000819 RID: 2073
12 {
13 // Token: 0x0600428D RID: 17037 RVA: 0x0024B8B8 File Offset: 0x00249AB8
15 {
16 if (!true)
17 {
18 }
19 base..ctor();
20 }
21
22 // Token: 0x0600428E RID: 17038 RVA: 0x0024B8D0 File Offset: 0x00249AD0
23 public override void RegisterTileEntityID(int assignedID)
24 {
25 }
26
27 // Token: 0x0600428F RID: 17039 RVA: 0x000021DB File Offset: 0x000003DB
28 public override TileEntity GenerateInstance()
29 {
30 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
31 }
32
33 // Token: 0x06004290 RID: 17040 RVA: 0x0024B8E0 File Offset: 0x00249AE0
34 public override void NetPlaceEntityAttempt(int x, int y)
35 {
37 }
38
39 // Token: 0x06004291 RID: 17041 RVA: 0x0024B8F4 File Offset: 0x00249AF4
40 public static void NetPlaceEntity(int x, int y)
41 {
42 int num = TEWeaponsRack.Place(x, y);
43 }
44
45 // Token: 0x06004292 RID: 17042 RVA: 0x0024B90C File Offset: 0x00249B0C
46 public override bool IsTileValidForEntity(int x, int y)
47 {
48 return TEWeaponsRack.ValidTile(x, y);
49 }
50
51 // Token: 0x06004293 RID: 17043 RVA: 0x0024B920 File Offset: 0x00249B20
52 public static bool ValidTile(int x, int y)
53 {
54 /*
55An exception occurred when decompiling this method (06004293)
56
57ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Tile_Entities.TEWeaponsRack::ValidTile(System.Int32,System.Int32)
58
59 ---> System.Exception: Basic block has to end with unconditional control flow.
60{
61 IL_0032:
62 stloc:int16(var_12_39, callgetter:int16(Tile::get_frameX, ldloc:Tile[exp:valuetype Terraria.Tile&](var_11)))
63}
64
65 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
66 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
67 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
68 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
69 --- End of inner exception stack trace ---
70 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
71 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
72*/;
73 }
74
75 // Token: 0x06004294 RID: 17044 RVA: 0x0024B968 File Offset: 0x00249B68
76 public static int Place(int x, int y)
77 {
78 if (!true)
79 {
80 }
81 int num = TileEntity.AssignNewID();
82 Monitor.Enter(x, x != 0);
83 long num2 = 0L;
84 Monitor.Exit(x);
85 if (num2 == 0L)
86 {
87 return x;
88 }
89 throw new OutOfMemoryException();
90 }
91
92 // Token: 0x06004295 RID: 17045 RVA: 0x0024B9B8 File Offset: 0x00249BB8
93 public static int Hook_AfterPlacement(int x, int y, int type = 471, int style = 0, int direction = 1, int alternate = 0)
94 {
95 if (!true)
96 {
97 }
99 if (!true)
100 {
101 }
102 int myPlayer = Main.myPlayer;
103 return 87;
104 }
105
106 // Token: 0x06004296 RID: 17046 RVA: 0x0024B9F4 File Offset: 0x00249BF4
107 public static void Kill(int x, int y)
108 {
109 if (!true)
110 {
111 }
112 int key = TileEntity.GetKey(x, y);
113 int key2 = TileEntity.GetKey(x, y);
114 if (!false)
115 {
116 return;
117 }
118 throw new OutOfMemoryException();
119 }
120
121 // Token: 0x06004297 RID: 17047 RVA: 0x0024BA38 File Offset: 0x00249C38
122 public static int Find(int x, int y)
123 {
124 if (!true)
125 {
126 }
127 int key = TileEntity.GetKey(int.MinValue, x);
128 return int.MinValue;
129 }
130
131 // Token: 0x06004298 RID: 17048 RVA: 0x0024BA60 File Offset: 0x00249C60
132 public override void WriteExtraData(BinaryWriter writer, bool networkSend)
133 {
134 int netID = this.item.netID;
135 byte prefix = this.item.prefix;
136 int stack = this.item.stack;
137 }
138
139 // Token: 0x06004299 RID: 17049 RVA: 0x0024BA94 File Offset: 0x00249C94
140 public override void ReadExtraData(BinaryReader reader, bool networkSend)
141 {
142 long num = 0L;
143 bool flag = this.item.Prefix((int)num);
144 Item item = this.item;
145 }
146
147 // Token: 0x0600429A RID: 17050 RVA: 0x0024BAB8 File Offset: 0x00249CB8
148 public override string ToString()
149 {
150 Point16 position = this.Position;
151 string text;
152 if ((text == null || text != null) && ("x " == null || "x " != null))
153 {
154 short y = this.Position.Y;
155 string text2;
156 if ((text2 == null || text2 != null) && ("y item: " == null || "y item: " != null))
157 {
158 Item item = this.item;
159 if (item == null || item == null || item != null)
160 {
161 string text3;
162 return text3;
163 }
164 }
165 }
166 throw new ArrayTypeMismatchException();
167 }
168
169 // Token: 0x0600429B RID: 17051 RVA: 0x0024BB1C File Offset: 0x00249D1C
170 public static void Framing_CheckTile(int callX, int callY)
171 {
172 int num = 1;
173 if (num == 0)
174 {
175 }
176 if (num == 0)
177 {
178 short frameX = Framing.GetTileSafely(callX, callY).frameX;
179 if (num == 0)
180 {
181 }
182 Tile tile;
183 bool flag = tile.active();
185 if (num == 0)
186 {
187 }
189 int num3 = 471;
191 Tile tile2;
192 bool flag2 = tile2.active();
193 Tile tile3;
194 ushort type = tile3.type;
195 long num4 = 0L;
196 long num5 = 0L;
197 long num6 = 0L;
198 WorldGen.KillTile(callX, callY, num4 != 0L, num5 != 0L, num6 != 0L);
200 }
201 }
202
203 // Token: 0x0600429C RID: 17052 RVA: 0x0024BBAC File Offset: 0x00249DAC
204 public void DropItem()
205 {
206 if (!true)
207 {
208 }
209 bool logicHost = Main.LogicHost;
210 Item item = this.item;
211 int netID = item.netID;
212 byte prefix = item.prefix;
213 }
214
215 // Token: 0x0600429D RID: 17053 RVA: 0x0024BBDC File Offset: 0x00249DDC
216 public static void TryPlacing(int x, int y, int netid, int prefix, int stack)
217 {
218 int num = 1;
219 if (num == 0)
220 {
221 }
222 WorldGen.RangeFrame(x, y, netid, prefix);
223 int num2 = TEWeaponsRack.Find(x, y);
224 if (num == 0)
225 {
226 }
227 }
228
229 // Token: 0x0600429E RID: 17054 RVA: 0x0024BC10 File Offset: 0x00249E10
230 public static void OnPlayerInteraction(Player player, int clickX, int clickY)
231 {
232 Vector2 position = player.inventory.position;
234 if (position2 != null)
235 {
236 if (position2 == null)
237 {
238 }
239 Tile tile;
240 short frameX = tile.frameX;
241 Tile tile2;
242 short frameY = tile2.frameY;
243 int num = TEWeaponsRack.Find(clickX, clickY);
244 if (position2 == null)
245 {
246 }
248 int num2 = 1;
249 long num3 = 0L;
250 long num4 = 0L;
251 WorldGen.KillTile(clickX, clickY, num2 != 0, num3 != 0L, num4 != 0L);
252 bool netClient = Main.NetClient;
253 return;
254 }
257 Recipe.FindRecipes(false);
258 }
259
260 // Token: 0x0600429F RID: 17055 RVA: 0x0024BCA0 File Offset: 0x00249EA0
261 public static bool FitsWeaponFrame(Item i)
262 {
263 int num = 1;
264 if (num != 0)
265 {
266 bool flag;
267 return flag;
268 }
269 }
270
271 // Token: 0x060042A0 RID: 17056 RVA: 0x0024BCC0 File Offset: 0x00249EC0
272 private static void PlaceItemInFrame(Player player, int x, int y)
273 {
274 int num = 1;
275 bool itemTimeIsZero = player.ItemTimeIsZero;
276 if (num == 0)
277 {
278 }
279 Tile tile;
280 short frameX = tile.frameX;
281 Tile tile2;
282 short frameY = tile2.frameY;
283 int num2 = TEWeaponsRack.Find(x, y);
284 if (num == 0)
285 {
286 }
287 int num3 = 1;
288 long num4 = 0L;
289 long num5 = 0L;
290 WorldGen.KillTile(x, y, num3 != 0, num4 != 0L, num5 != 0L);
291 bool netClient = Main.NetClient;
292 int tileTargetX = Player.tileTargetX;
294 int selectedItem = player.selectedItem;
295 int whoAmI = player.whoAmI;
296 }
297
298 // Token: 0x060042A1 RID: 17057 RVA: 0x0024BDE8 File Offset: 0x00249FE8
299 public void FixLoadedData()
300 {
301 this.item.FixAgainstExploit();
302 }
303
304 // Token: 0x040080EC RID: 33004
305 private static byte _myEntityID;
306
307 // Token: 0x040080ED RID: 33005
308 public Item item;
309
310 // Token: 0x040080EE RID: 33006
311 private const int MyTileID = 471;
312 }
313}
class f__AnonymousType0<< Count > j__TPar
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static int GetKey(int x, int y)
Vector2 position
Definition Entity.cs:460
static Tile GetTileSafely(Vector2 position)
Definition Framing.cs:356
override void WriteExtraData(BinaryWriter writer, bool networkSend)
override void NetPlaceEntityAttempt(int x, int y)
static int Hook_AfterPlacement(int x, int y, int type=471, int style=0, int direction=1, int alternate=0)
override bool IsTileValidForEntity(int x, int y)
static void PlaceItemInFrame(Player player, int x, int y)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static void Framing_CheckTile(int callX, int callY)
override void RegisterTileEntityID(int assignedID)
override void ReadExtraData(BinaryReader reader, bool networkSend)
static void OnPlayerInteraction(Player player, int clickX, int clickY)
bool Prefix(int prefixWeWant)
Definition Item.cs:234
byte prefix
Definition Item.cs:2397
void FixAgainstExploit()
Definition Item.cs:1274
static int myPlayer
Definition Main.cs:2337
static bool NetClient
Definition Main.cs:5438
static bool NetClientOnly
Definition Main.cs:5407
static bool LogicHost
Definition Main.cs:5469
static Player LocalPlayer
Definition Main.cs:5267
void GamepadEnableGrappleCooldown()
Definition Player.cs:7876
bool ItemTimeIsZero
Definition Player.cs:1651
void InterruptItemUsageIfOverTile(int tileTypeToBeOver)
Definition Player.cs:1854
static int tileTargetX
Definition Player.cs:66
Item[] inventory
Definition Player.cs:21263
static void FindRecipes(bool canDelayCheck=false)
Definition Recipe.cs:204
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static void RangeFrame(int startX, int startY, int endX, int endY)
short frameY
Definition Tile.cs:285
short frameX
Definition Tile.cs:244
bool active()
Definition Tile.cs:1241