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
GUIMultiplayerLobby.cs
Go to the documentation of this file.
1using System;
9using Terraria;
12
13// Token: 0x0200026A RID: 618
15{
16 // Token: 0x06000DDE RID: 3550 RVA: 0x00042B4C File Offset: 0x00040D4C
17 public static void LoadContent(ContentManager content)
18 {
19 Texture2D texture2D = content.Load<Texture2D>("Images/UI/ButtonFavoriteActive");
20 Texture2D texture2D2 = content.Load<Texture2D>("Images/UI/ButtonFavoriteInactive");
21 }
22
23 // Token: 0x17000179 RID: 377
24 // (get) Token: 0x06000DDF RID: 3551 RVA: 0x00042B74 File Offset: 0x00040D74
32
33 // Token: 0x06000DE0 RID: 3552 RVA: 0x00042B88 File Offset: 0x00040D88
34 public void Draw()
35 {
36 if (!true)
37 {
38 }
40 }
41
42 // Token: 0x06000DE1 RID: 3553 RVA: 0x00042C18 File Offset: 0x00040E18
51
52 // Token: 0x06000DE2 RID: 3554 RVA: 0x00042C38 File Offset: 0x00040E38
80
81 // Token: 0x06000DE3 RID: 3555 RVA: 0x00042CAC File Offset: 0x00040EAC
82 public void Startup()
83 {
84 if (!true)
85 {
86 }
88 }
89
90 // Token: 0x06000DE4 RID: 3556 RVA: 0x00042CC4 File Offset: 0x00040EC4
91 public void Shutdown()
92 {
93 if (!true)
94 {
95 }
97 }
98
99 // Token: 0x06000DE5 RID: 3557 RVA: 0x00042CDC File Offset: 0x00040EDC
100 private void DrawLocal()
101 {
102 this.RefreshLocalServers();
103 if (this.NoPlatformFriends)
104 {
105 string textValue = Language.GetTextValue("Mobile.StadiaNoFriends");
106 return;
107 }
108 string textValue2 = Language.GetTextValue("Mobile.StadiaSearchingFriendGames");
109 if ("Mobile.StadiaSearchingFriendGames" == null)
110 {
111 }
112 if ("Mobile.StadiaSearchingFriendGames" == null)
113 {
114 }
115 if (6899 == 0)
116 {
117 }
120 {
121 }
125 {
126 }
127 }
128
129 // Token: 0x06000DE6 RID: 3558 RVA: 0x00042D50 File Offset: 0x00040F50
130 private void DrawOptions()
131 {
134 int width = this.fullClipRegion.Width;
136 int width2 = this.dragClipRegion.Width;
138 int num = this.selectedServer;
139 int size = this.serverList._size;
140 }
141
142 // Token: 0x06000DE7 RID: 3559 RVA: 0x00042E48 File Offset: 0x00041048
143 private void DrawDedicated()
144 {
146 int size = this.serverList._size;
147 this.dragClipRegion.X = (int)0f;
149 int width = this.fullClipRegion.Width;
151 int width2 = this.dragClipRegion.Width;
152 bool flag = this.serverJoinAvailable;
156 {
158 }
160 if (controllerInput == null)
161 {
162 }
165 {
166 }
167 }
168
169 // Token: 0x06000DE8 RID: 3560 RVA: 0x000021DB File Offset: 0x000003DB
170 private void RefreshLocalServers()
171 {
172 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
173 }
174
175 // Token: 0x06000DE9 RID: 3561 RVA: 0x000021DB File Offset: 0x000003DB
177 {
178 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
179 }
180
181 // Token: 0x06000DEA RID: 3562 RVA: 0x00042ECC File Offset: 0x000410CC
183 {
184 bool isHardMode = serverData.IsHardMode;
185 if (!serverData.HasCorruption)
186 {
187 }
188 string text;
189 return TextureManager.Load(text);
190 }
191
192 // Token: 0x06000DEB RID: 3563 RVA: 0x00042EF0 File Offset: 0x000410F0
196
197 // Token: 0x06000DEC RID: 3564 RVA: 0x00042F04 File Offset: 0x00041104
198 private void JoinServerCheck()
199 {
201 int num = this.selectedServer;
202 }
203
204 // Token: 0x06000DED RID: 3565 RVA: 0x00042F28 File Offset: 0x00041128
206 {
207 /*
208An exception occurred when decompiling this method (06000DED)
209
210ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 GUIMultiplayerLobby::ServerItemSize(System.Int32)
211
212 ---> System.Exception: Basic block has to end with unconditional control flow.
213{
214 Block_0:
215 stloc:int32(var_0_06, ldfld:int32(GUIMultiplayerLobby::selectedServer, ldloc:GUIMultiplayerLobby(this)))
216}
217
218 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
219 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
220 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
221 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
222 --- End of inner exception stack trace ---
223 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
224 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
225*/;
226 }
227
228 // Token: 0x06000DEE RID: 3566 RVA: 0x00042F3C File Offset: 0x0004113C
229 private void ServerDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
230 {
231 int num = this.selectedServer;
232 int num2 = this.selectedServer;
233 int num3 = this.serverOver;
234 }
235
236 // Token: 0x06000DEF RID: 3567 RVA: 0x00043170 File Offset: 0x00041370
237 private void OpenPlatformInvite()
238 {
239 }
240
241 // Token: 0x06000DF0 RID: 3568 RVA: 0x00043180 File Offset: 0x00041380
242 private void DrawMainButtons()
243 {
244 int num = 1;
245 if (num == 0)
246 {
247 }
248 bool mouseLeft = Main.mouseLeft;
249 if (num == 0)
250 {
251 }
252 bool mouseLeftRelease = Main.mouseLeftRelease;
253 int num2 = this.selectedServer;
254 int size = this.serverList._size;
255 }
256
257 // Token: 0x06000DF1 RID: 3569 RVA: 0x000431D8 File Offset: 0x000413D8
258 private void Back()
259 {
261 Main.menuMode = 1;
262 }
263
264 // Token: 0x06000DF2 RID: 3570 RVA: 0x000021DB File Offset: 0x000003DB
265 private float ServerScale(int index)
266 {
267 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
268 }
269
270 // Token: 0x06000DF3 RID: 3571 RVA: 0x000431F4 File Offset: 0x000413F4
271 private void ServerOver(int index)
272 {
274 }
275
276 // Token: 0x06000DF4 RID: 3572 RVA: 0x00043208 File Offset: 0x00041408
283
284 // Token: 0x06000DF5 RID: 3573 RVA: 0x00043224 File Offset: 0x00041424
285 private void JoinServer()
286 {
288 int num = this.selectedServer;
289 }
290
291 // Token: 0x06000DF6 RID: 3574 RVA: 0x00043260 File Offset: 0x00041460
298
299 // Token: 0x06000DF7 RID: 3575 RVA: 0x00043284 File Offset: 0x00041484
300 private void AddDedicatedServer()
301 {
302 if (!true)
303 {
304 }
305 Main.menuMode = 449;
306 }
307
308 // Token: 0x06000DF8 RID: 3576 RVA: 0x000432A0 File Offset: 0x000414A0
310 {
311 bool favorite = a.Favorite;
312 bool favorite2 = b.Favorite;
313 return 1;
314 }
315
316 // Token: 0x06000DF9 RID: 3577 RVA: 0x000432C0 File Offset: 0x000414C0
317 public int CompareNatural(string strA, string strB)
318 {
319 if (!true)
320 {
321 }
323 int num;
324 return num;
325 }
326
327 // Token: 0x06000DFA RID: 3578 RVA: 0x000432DC File Offset: 0x000414DC
329 {
330 long num2;
331 for (;;)
332 {
333 int stringLength = strB._stringLength;
334 int stringLength2 = strA._stringLength;
335 long num = 0L;
336 num2 = 0L;
337 char c = strA[(int)num];
338 if (stringLength2 == 0)
339 {
340 }
341 bool flag = char.IsDigit(c);
342 bool flag2 = char.IsDigit(strB[(int)num2]);
343 char c2 = strA[(int)num];
344 char c3 = strA[(int)num];
345 if (stringLength2 == 0)
346 {
347 }
348 double numericValue = char.GetNumericValue(c3);
349 char c4 = strB[(int)num2];
350 double numericValue2 = char.GetNumericValue(strB[(int)num2]);
351 int stringLength3 = strA._stringLength;
352 char c5 = strA[(int)num];
353 int stringLength4 = strA._stringLength;
354 int stringLength5 = strB._stringLength;
355 char c6 = strB[(int)num2];
356 int stringLength6 = strB._stringLength;
357 int stringLength7 = strA._stringLength;
358 char c7 = strA[(int)num];
359 if (stringLength2 == 0)
360 {
361 }
362 bool flag3 = char.IsDigit(c7);
363 long num3 = 0L;
364 int stringLength8 = strB._stringLength;
365 char c8 = strB[(int)num2];
366 if (stringLength2 == 0)
367 {
368 }
369 bool flag4 = char.IsDigit(c8);
370 if (num3 != 0L)
371 {
372 goto IL_00EF;
373 }
374 if (c4 != '\0')
375 {
376 goto IL_010F;
377 }
378 long num4;
379 if (num3 == 0L)
380 {
381 num4 = 0L;
382 while (num3 == 0L)
383 {
384 }
385 goto IL_00EF;
386 }
387 goto IL_0130;
388 IL_0139:
389 string text5;
390 if (num4 != 0L)
391 {
392 char c9 = strB[(int)num2];
393 int num5 = 1;
394 int stringLength9 = strA._stringLength;
395 char c10 = strA[(int)num];
396 if (stringLength9 == 0)
397 {
398 }
399 bool flag5 = char.IsDigit(c10);
400 int stringLength10 = strB._stringLength;
401 char c11 = strB[(int)num2];
402 if (stringLength9 == 0)
403 {
404 }
405 bool flag6 = char.IsDigit(c11);
406 int stringLength11 = strB._stringLength;
407 if (num4 == 0L)
408 {
409 goto IL_01EA;
410 }
411 string text = strA.Substring((int)num, num5);
412 string text2 = strB.Substring((int)num3, (int)c11);
413 string text3 = text + "1";
414 string text4 = text2 + "2";
415 text5 = text + "2";
416 string text6 = text2 + "1";
417 }
418 if (text5 != null)
419 {
420 continue;
421 }
422 IL_01EA:
423 int stringLength12 = strB._stringLength;
424 int stringLength13 = strA._stringLength;
425 if (stringLength12 != 0)
426 {
427 break;
428 }
429 continue;
430 IL_010F:
431 char c12 = strB[(int)num2];
432 int num6;
433 if (num6 == 0)
434 {
435 }
436 double numericValue3 = char.GetNumericValue(c12);
437 if (num3 == 0L)
438 {
439 goto IL_0139;
440 }
441 IL_0130:
442 char c13 = strA[(int)num];
443 goto IL_0139;
444 IL_00EF:
445 char c14 = strA[(int)num];
446 if (stringLength2 == 0)
447 {
448 }
449 double numericValue4 = char.GetNumericValue(c14);
450 num6 = 32768;
451 while (num4 == 0L)
452 {
453 }
454 goto IL_010F;
455 }
456 while (num2 == 0L)
457 {
458 }
459 return 1;
460 }
461
462 // Token: 0x06000DFB RID: 3579 RVA: 0x000434F0 File Offset: 0x000416F0
464 {
465 long num = 1065353216L;
466 this.NewScale = (float)num;
467 base..ctor();
468 }
469
470 // Token: 0x0400197E RID: 6526
472
473 // Token: 0x0400197F RID: 6527
474 public bool NoPlatformFriends;
475
476 // Token: 0x04001980 RID: 6528
477 private float localScale;
478
479 // Token: 0x04001981 RID: 6529
480 private float dedicatedScale;
481
482 // Token: 0x04001982 RID: 6530
483 private float joinButtonScale;
484
485 // Token: 0x04001983 RID: 6531
486 private float backButtonScale;
487
488 // Token: 0x04001984 RID: 6532
489 private float NewScale;
490
491 // Token: 0x04001985 RID: 6533
492 private float TitleScale;
493
494 // Token: 0x04001986 RID: 6534
495 private float DeleteScale;
496
497 // Token: 0x04001987 RID: 6535
498 public int previousMenu;
499
500 // Token: 0x04001988 RID: 6536
502
503 // Token: 0x04001989 RID: 6537
504 private const double DOUBLE_CLICK_TIME = 500.0;
505
506 // Token: 0x0400198A RID: 6538
507 public float ScrollOffset;
508
509 // Token: 0x0400198B RID: 6539
510 private float ScrollMomentum;
511
512 // Token: 0x0400198C RID: 6540
513 private int ScrollDragging;
514
515 // Token: 0x0400198D RID: 6541
517
518 // Token: 0x0400198E RID: 6542
520
521 // Token: 0x0400198F RID: 6543
523
524 // Token: 0x04001990 RID: 6544
526
527 // Token: 0x04001991 RID: 6545
529
530 // Token: 0x04001992 RID: 6546
532
533 // Token: 0x04001993 RID: 6547
535
536 // Token: 0x04001994 RID: 6548
538
539 // Token: 0x04001995 RID: 6549
540 public int selectedServer;
541
542 // Token: 0x04001996 RID: 6550
544
545 // Token: 0x04001997 RID: 6551
547
548 // Token: 0x04001998 RID: 6552
550
551 // Token: 0x04001999 RID: 6553
552 private int serverOver;
553
554 // Token: 0x0200026B RID: 619
555 public enum ItemSelection
556 {
557 // Token: 0x0400199B RID: 6555
558 Local,
559 // Token: 0x0400199C RID: 6556
561 }
562
563 // Token: 0x0200026C RID: 620
564 public struct ServerInformation
565 {
566 // Token: 0x06000DFC RID: 3580 RVA: 0x0004351C File Offset: 0x0004171C
567 public ServerInformation(string worldName, string hostName, string serverIPText, int port, int players, int maxPlayers, int worldWidth, bool corruption, short gameMode, bool hardMode, bool active = true, bool favorite = false, int realID = 0, [Optional] MPSession existingSession)
568 {
569 this.WorldName = worldName;
570 this.CurrentPlayers = players;
571 this.WorldWidth = maxPlayers;
574 this.ServerPort = port;
575 this.HostName = hostName;
576 }
577
578 // Token: 0x1700017A RID: 378
579 // (get) Token: 0x06000DFD RID: 3581 RVA: 0x00043560 File Offset: 0x00041760
580 public string WorldSize
581 {
582 get
583 {
584 int worldWidth = this.WorldWidth;
585 string text;
586 return text;
587 }
588 }
589
590 // Token: 0x0400199D RID: 6557
591 public int RealID;
592
593 // Token: 0x0400199E RID: 6558
594 public string WorldName;
595
596 // Token: 0x0400199F RID: 6559
597 public int CurrentPlayers;
598
599 // Token: 0x040019A0 RID: 6560
600 public int MaxPlayers;
601
602 // Token: 0x040019A1 RID: 6561
603 public int WorldWidth;
604
605 // Token: 0x040019A2 RID: 6562
606 public bool HasCorruption;
607
608 // Token: 0x040019A3 RID: 6563
609 public short GameMode;
610
611 // Token: 0x040019A4 RID: 6564
612 public bool IsHardMode;
613
614 // Token: 0x040019A5 RID: 6565
615 public string ServerIPText;
616
617 // Token: 0x040019A6 RID: 6566
618 public int ServerPort;
619
620 // Token: 0x040019A7 RID: 6567
621 public string HostName;
622
623 // Token: 0x040019A8 RID: 6568
624 public bool Active;
625
626 // Token: 0x040019A9 RID: 6569
627 public bool Favorite;
628
629 // Token: 0x040019AA RID: 6570
631 }
632}
class f__AnonymousType0<< Count > j__TPar
static void SetGridItemRegion(Rectangle region)
Texture2D GetIcon(GUIMultiplayerLobby.ServerInformation serverData)
void DrawServer(GUIMultiplayerLobby.ServerInformation serverData)
void ServerDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
GUIMultiplayerLobby.ItemSelection CurrentSelection
static Texture2D _buttonFavoriteActiveTexture
GUIControllerMultiplayerLobby _controllerInput
GUIContollerTransactionButtonList _multiplayerLobbyOptionsController
float ServerScale(int index)
static Texture2D _buttonFavoriteInactiveTexture
GUIContollerTransactionButtonList MultiplayerLobbyOptionsController
List< GUIMultiplayerLobby.ServerInformation > serverList
GUIMultiplayerLobby.ServerInformation ActiveServer()
int SortEntry(GUIMultiplayerLobby.ServerInformation a, GUIMultiplayerLobby.ServerInformation b)
static void LoadContent(ContentManager content)
int CompareNatural(string strA, string strB, CultureInfo culture, CompareOptions options)
Vector2 ServerItemSize(int index)
int CompareNatural(string strA, string strB)
static void StopSearching()
static void StartSearching()
static CultureInfo CurrentCulture
static Texture2D Load(string name)
static string GetTextValue(string key)
Definition Language.cs:54
static void LoadWorlds()
Definition Main.cs:5700
static bool mouseLeftRelease
Definition Main.cs:2029
static bool mouseLeft
Definition Main.cs:671
ServerInformation(string worldName, string hostName, string serverIPText, int port, int players, int maxPlayers, int worldWidth, bool corruption, short gameMode, bool hardMode, bool active=true, bool favorite=false, int realID=0, [Optional] MPSession existingSession)