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
NetMessage.cs
Go to the documentation of this file.
1using System;
2using System.IO;
8using Terraria.ID;
10using UnityEngine;
11
12namespace Terraria
13{
14 // Token: 0x02000400 RID: 1024
15 public class NetMessage
16 {
17 // Token: 0x060020CB RID: 8395 RVA: 0x000CFFB0 File Offset: 0x000CE1B0
18 public static bool TrySendData(int msgType, int remoteClient = -1, int ignoreClient = -1, [Optional] NetworkText text, int number = 0, float number2 = 0f, float number3 = 0f, float number4 = 0f, int number5 = 0, int number6 = 0, int number7 = 0)
19 {
20 if (!true)
21 {
22 return;
23 }
24 }
25
26 // Token: 0x060020CC RID: 8396 RVA: 0x000CFFC8 File Offset: 0x000CE1C8
27 public static void SendData(int msgType, int remoteClient = -1, int ignoreClient = -1, [Optional] NetworkText text, int number = 0, float number2 = 0f, float number3 = 0f, float number4 = 0f, int number5 = 0, int number6 = 0, int number7 = 0)
28 {
29 int num = 1;
30 if (num == 0)
31 {
32 }
33 if (num != 0)
34 {
35 if (num == 0)
36 {
37 }
38 if (num == 0)
39 {
40 if (num == 0)
41 {
42 }
43 int num2 = 145;
44 if (text != null || num2 == 0)
45 {
46 }
47 bool netHost = Main.NetHost;
48 return;
49 }
50 }
51 }
52
53 // Token: 0x060020CD RID: 8397 RVA: 0x000D1500 File Offset: 0x000CF700
54 private static void WriteAccessoryVisibility(BinaryWriter writer, bool[] hideVisibleAccessory)
55 {
56 }
57
58 // Token: 0x060020CE RID: 8398 RVA: 0x000D1510 File Offset: 0x000CF710
59 public static void CompressTileBlock(int xStart, int yStart, short width, short height, Stream stream)
60 {
61 }
62
63 // Token: 0x060020CF RID: 8399 RVA: 0x000D1544 File Offset: 0x000CF744
64 public static bool DoesPlayerSlotCountAsAHost(int plr)
65 {
66 if (!true)
67 {
68 return;
69 }
70 }
71
72 // Token: 0x060020D0 RID: 8400 RVA: 0x000D1558 File Offset: 0x000CF758
73 public static void CompressTileBlock_Inner(BinaryWriter writer, int xStart, int yStart, int width, int height)
74 {
75 if (!true)
76 {
77 }
78 Tile tile;
79 ushort type = tile.type;
80 }
81
82 // Token: 0x060020D1 RID: 8401 RVA: 0x000D16B0 File Offset: 0x000CF8B0
83 public static void DecompressTileBlock(Stream stream)
84 {
85 }
86
87 // Token: 0x060020D2 RID: 8402 RVA: 0x000D16E0 File Offset: 0x000CF8E0
88 public static void DecompressTileBlock_Inner(BinaryReader reader, int xStart, int yStart, int width, int height)
89 {
90 if (!true)
91 {
92 }
93 if (false)
94 {
95 return;
96 }
97 Tile tile;
98 tile.ClearEverything();
99 }
100
101 // Token: 0x060020D3 RID: 8403 RVA: 0x000D177C File Offset: 0x000CF97C
102 public static void BootPlayer(int plr, NetworkText msg)
103 {
104 if (!true)
105 {
106 }
107 }
108
109 // Token: 0x060020D4 RID: 8404 RVA: 0x000D178C File Offset: 0x000CF98C
110 public static void SendObjectPlacement(int whoAmi, int x, int y, int type, int style, int alternative, int random, int direction)
111 {
112 if (!true)
113 {
114 }
115 bool netHost = Main.NetHost;
116 }
117
118 // Token: 0x060020D5 RID: 8405 RVA: 0x000D17A4 File Offset: 0x000CF9A4
119 public static void SendTemporaryAnimation(int whoAmi, int animationType, int tileType, int xCoord, int yCoord)
120 {
121 if (!true)
122 {
123 }
124 }
125
126 // Token: 0x060020D6 RID: 8406 RVA: 0x000D17B4 File Offset: 0x000CF9B4
127 public static void SendPlayerHurt(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool critical, bool pvp, int hitContext, int remoteClient = -1, int ignoreClient = -1)
128 {
129 if (!true)
130 {
131 }
132 BitsByte bitsByte = 0;
133 long num = 0L;
134 bitsByte[(int)num] = damage != 0;
135 bitsByte[1] = damage != 0;
136 }
137
138 // Token: 0x060020D7 RID: 8407 RVA: 0x000D17E0 File Offset: 0x000CF9E0
139 public static void SendPlayerDeath(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool pvp, int remoteClient = -1, int ignoreClient = -1)
140 {
141 if (!true)
142 {
143 }
144 BitsByte bitsByte = 0;
145 long num = 0L;
146 bitsByte[(int)num] = damage != 0;
147 }
148
149 // Token: 0x060020D8 RID: 8408 RVA: 0x000D1804 File Offset: 0x000CFA04
150 public static void PlayNetSound(NetMessage.NetSoundInfo info, int remoteClient = -1, int ignoreClient = -1)
151 {
152 if (info.volume == null)
153 {
154 }
155 }
156
157 // Token: 0x060020D9 RID: 8409 RVA: 0x000D181C File Offset: 0x000CFA1C
159 {
160 if (!true)
161 {
162 }
163 }
164
165 // Token: 0x060020DA RID: 8410 RVA: 0x000D182C File Offset: 0x000CFA2C
166 public static void SendTileSquare(int whoAmi, int tileX, int tileY, int xSize, int ySize, TileChangeType changeType = TileChangeType.None)
167 {
168 if (!true)
169 {
170 }
171 if (!true)
172 {
173 }
175 }
176
177 // Token: 0x060020DB RID: 8411 RVA: 0x000D184C File Offset: 0x000CFA4C
185
186 // Token: 0x060020DC RID: 8412 RVA: 0x000D1868 File Offset: 0x000CFA68
187 public static void SendTileSquare(int whoAmi, int tileX, int tileY, TileChangeType changeType = TileChangeType.None)
188 {
189 if (!true)
190 {
191 }
193 }
194
195 // Token: 0x060020DD RID: 8413 RVA: 0x000D1884 File Offset: 0x000CFA84
196 public static void SendTravelShop(int remoteClient)
197 {
198 if (!true)
199 {
200 }
201 bool netHost = Main.NetHost;
202 }
203
204 // Token: 0x060020DE RID: 8414 RVA: 0x000D189C File Offset: 0x000CFA9C
205 public static void SendAnglerQuest(int remoteClient)
206 {
207 int num = 1;
208 if (num == 0)
209 {
210 }
211 bool netHost = Main.NetHost;
212 if (num == 0)
213 {
214 }
215 if (num == 0)
216 {
217 }
218 }
219
220 // Token: 0x060020DF RID: 8415 RVA: 0x000D18C8 File Offset: 0x000CFAC8
221 public static void SendSection(int whoAmi, int sectionX, int sectionY)
222 {
223 if (!true)
224 {
225 }
227 }
228
229 // Token: 0x060020E0 RID: 8416 RVA: 0x000D196C File Offset: 0x000CFB6C
230 public static void greetPlayer(int plr)
231 {
232 if (!true)
233 {
234 }
236 if ((networkText == null || networkText != null) && (networkText == null || networkText != null))
237 {
238 return;
239 }
240 throw new ArrayTypeMismatchException();
241 }
242
243 // Token: 0x060020E1 RID: 8417 RVA: 0x000D19E4 File Offset: 0x000CFBE4
244 public static void sendWater(int x, int y)
245 {
246 int num = 1;
247 if (num == 0)
248 {
249 }
250 bool netClient = Main.NetClient;
251 if (num == 0)
252 {
253 }
254 }
255
256 // Token: 0x060020E2 RID: 8418 RVA: 0x000D1A28 File Offset: 0x000CFC28
257 public static void SyncDisconnectedPlayer(int plr)
258 {
259 if (!true)
260 {
261 }
263 }
264
265 // Token: 0x060020E3 RID: 8419 RVA: 0x000D1A40 File Offset: 0x000CFC40
266 public static void SyncConnectedPlayer(int plr)
267 {
268 int num = 1;
269 if (num == 0)
270 {
271 }
272 long num2 = 0L;
273 if (num == 0)
274 {
275 }
276 if (num != 0)
277 {
279 }
284 }
285
286 // Token: 0x060020E4 RID: 8420 RVA: 0x000D1A7C File Offset: 0x000CFC7C
287 private static void SendNPCHousesAndTravelShop(int plr)
288 {
289 if (!true)
290 {
291 }
292 int num = NPC.TypeToDefaultHeadIndex(0);
293 }
294
295 // Token: 0x060020E5 RID: 8421 RVA: 0x000D1AA4 File Offset: 0x000CFCA4
296 public static void EnsureLocalPlayerIsPresent()
297 {
298 int num = 1;
299 if (num == 0)
300 {
301 }
302 if (num != 0)
303 {
304 if (num == 0)
305 {
306 }
307 if (num == 0)
308 {
309 }
310 if (num == 0)
311 {
312 if (num == 0)
313 {
314 }
315 if (num != 0)
316 {
317 return;
318 }
319 }
320 if (num == 0)
321 {
322 }
323 Debug.Log("Local player left. Autoshutdown starting.");
324 Main.menuMode = 10;
325 return;
326 }
327 }
328
329 // Token: 0x060020E6 RID: 8422 RVA: 0x000D1AE0 File Offset: 0x000CFCE0
330 private static void SyncOnePlayer(int plr, int toWho, int fromWho)
331 {
332 int num = 1;
333 if (num == 0)
334 {
335 }
336 if (num != 0)
337 {
338 return;
339 }
340 }
341
342 // Token: 0x060020E7 RID: 8423 RVA: 0x000D1BC8 File Offset: 0x000CFDC8
343 private static void SyncOnePlayer_ItemArray(int plr, int toWho, int fromWho, Item[] arr, int slot)
344 {
345 long entityId = arr.entityId;
346 }
347
348 // Token: 0x060020E8 RID: 8424 RVA: 0x000D1BE0 File Offset: 0x000CFDE0
349 public NetMessage()
350 {
351 }
352
353 // Token: 0x060020E9 RID: 8425 RVA: 0x000D1BF4 File Offset: 0x000CFDF4
354 // Note: this type is marked as 'beforefieldinit'.
355 static NetMessage()
356 {
357 }
358
359 // Token: 0x04002CF1 RID: 11505
360 public static MessageBuffer[] buffer;
361
362 // Token: 0x04002CF2 RID: 11506
363 private static byte[] writeBuffer;
364
365 // Token: 0x04002CF3 RID: 11507
367
368 // Token: 0x04002CF4 RID: 11508
369 private static short[] chestList;
370
371 // Token: 0x04002CF5 RID: 11509
372 private static short[] signList;
373
374 // Token: 0x04002CF6 RID: 11510
375 private static short[] entityList;
376
377 // Token: 0x04002CF7 RID: 11511
378 private static byte[] bytes;
379
380 // Token: 0x04002CF8 RID: 11512
382
383 // Token: 0x04002CF9 RID: 11513
385
386 // Token: 0x04002CFA RID: 11514
388
389 // Token: 0x02000401 RID: 1025
390 public struct NetSoundInfo
391 {
392 // Token: 0x060020EA RID: 8426 RVA: 0x000D1C04 File Offset: 0x000CFE04
393 public NetSoundInfo(Microsoft.Xna.Framework.Vector2 position, ushort soundIndex, int style = -1, float volume = -1f, float pitchOffset = -1f)
394 {
396 this.style = (int)soundIndex;
397 }
398
399 // Token: 0x060020EB RID: 8427 RVA: 0x000D1C20 File Offset: 0x000CFE20
400 public void WriteSelfTo(BinaryWriter writer)
401 {
403 if (!true)
404 {
405 }
406 ushort num = this.soundIndex;
407 int num2 = this.style;
408 float num3 = this.volume;
409 float num4 = this.pitchOffset;
410 }
411
412 // Token: 0x04002CFB RID: 11515
414
415 // Token: 0x04002CFC RID: 11516
416 public ushort soundIndex;
417
418 // Token: 0x04002CFD RID: 11517
419 public int style;
420
421 // Token: 0x04002CFE RID: 11518
422 public float volume;
423
424 // Token: 0x04002CFF RID: 11519
425 public float pitchOffset;
426 }
427 }
428}
class f__AnonymousType0<< Count > j__TPar
static void SendCreditsRollRemainingTimeToPlayer(int playerIndex)
static bool NetHost
Definition Main.cs:5544
static bool NetClient
Definition Main.cs:5438
static bool NetClientOnly
Definition Main.cs:5407
static int TypeToDefaultHeadIndex(int type)
Definition NPC.cs:1002
static void SendPlayerHurt(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool critical, bool pvp, int hitContext, int remoteClient=-1, int ignoreClient=-1)
static PlayerDeathReason _currentPlayerDeathReason
static void SendAnglerQuest(int remoteClient)
static void greetPlayer(int plr)
static void DecompressTileBlock_Inner(BinaryReader reader, int xStart, int yStart, int width, int height)
Definition NetMessage.cs:88
static void WriteAccessoryVisibility(BinaryWriter writer, bool[] hideVisibleAccessory)
Definition NetMessage.cs:54
static void SendNPCHousesAndTravelShop(int plr)
static bool DoesPlayerSlotCountAsAHost(int plr)
Definition NetMessage.cs:64
static void SendTileSquare(int whoAmi, int tileX, int tileY, int xSize, int ySize, TileChangeType changeType=TileChangeType.None)
static short[] signList
static void CompressTileBlock(int xStart, int yStart, short width, short height, Stream stream)
Definition NetMessage.cs:59
static void PlayNetSound(NetMessage.NetSoundInfo info, int remoteClient=-1, int ignoreClient=-1)
static MessageBuffer[] buffer
static void SendTileSquare(int whoAmi, int tileX, int tileY, int centeredSquareSize, TileChangeType changeType=TileChangeType.None)
static void SendTravelShop(int remoteClient)
static CoinLossRevengeSystem.RevengeMarker _currentRevengeMarker
static void BootPlayer(int plr, NetworkText msg)
static void SendTemporaryAnimation(int whoAmi, int animationType, int tileType, int xCoord, int yCoord)
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, [Optional] NetworkText text, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
Definition NetMessage.cs:27
static NetMessage.NetSoundInfo _currentNetSoundInfo
static short[] entityList
static byte[] writeBuffer
static void DecompressTileBlock(Stream stream)
Definition NetMessage.cs:83
static void SyncDisconnectedPlayer(int plr)
static void SendPlayerDeath(int playerTargetIndex, PlayerDeathReason reason, int damage, int direction, bool pvp, int remoteClient=-1, int ignoreClient=-1)
static void SyncOnePlayer(int plr, int toWho, int fromWho)
static void SyncOnePlayer_ItemArray(int plr, int toWho, int fromWho, Item[] arr, int slot)
static short[] chestList
static void SendObjectPlacement(int whoAmi, int x, int y, int type, int style, int alternative, int random, int direction)
static void SendSection(int whoAmi, int sectionX, int sectionY)
static void SendTileSquare(int whoAmi, int tileX, int tileY, TileChangeType changeType=TileChangeType.None)
static void sendWater(int x, int y)
static bool TrySendData(int msgType, int remoteClient=-1, int ignoreClient=-1, [Optional] NetworkText text, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
Definition NetMessage.cs:18
static void CompressTileBlock_Inner(BinaryWriter writer, int xStart, int yStart, int width, int height)
Definition NetMessage.cs:73
static void SendCoinLossRevengeMarker(CoinLossRevengeSystem.RevengeMarker marker, int remoteClient=-1, int ignoreClient=-1)
static void SyncConnectedPlayer(int plr)
static void EnsureLocalPlayerIsPresent()
static byte[] bytes
static BinaryWriter streamWriter
static void RangeFrame(int startX, int startY, int endX, int endY)
static void Log(object message)
Definition Debug.cs:51
NetSoundInfo(Microsoft.Xna.Framework.Vector2 position, ushort soundIndex, int style=-1, float volume=-1f, float pitchOffset=-1f)
Microsoft.Xna.Framework.Vector2 position
void WriteSelfTo(BinaryWriter writer)
ushort type
Definition Tile.cs:58
void ClearEverything()
Definition Tile.cs:355