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
ChatHelper.cs
Go to the documentation of this file.
1using System;
6using Terraria.Net;
7
8namespace Terraria.Chat
9{
10 // Token: 0x02000794 RID: 1940
11 public static class ChatHelper
12 {
13 // Token: 0x06003F7D RID: 16253 RVA: 0x00240B24 File Offset: 0x0023ED24
14 public static void DisplayMessageOnClient(NetworkText text, Color color, int playerId)
15 {
16 if (!true)
17 {
18 }
19 int myPlayer = Main.myPlayer;
20 }
21
22 // Token: 0x06003F7E RID: 16254 RVA: 0x00240B48 File Offset: 0x0023ED48
23 public static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
24 {
25 if (!true)
26 {
27 }
28 }
29
30 // Token: 0x06003F7F RID: 16255 RVA: 0x00240B58 File Offset: 0x0023ED58
31 public static void SendChatMessageToClientAs(byte messageAuthor, NetworkText text, Color color, int playerId)
32 {
33 if (!true)
34 {
35 }
36 int myPlayer = Main.myPlayer;
37 }
38
39 // Token: 0x06003F80 RID: 16256 RVA: 0x00240B7C File Offset: 0x0023ED7C
40 public static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer = -1)
41 {
42 if (!true)
43 {
44 }
45 }
46
47 // Token: 0x06003F81 RID: 16257 RVA: 0x00240B8C File Offset: 0x0023ED8C
48 public static void BroadcastChatMessageAs(byte messageAuthor, NetworkText text, Color color, int excludedPlayer = -1)
49 {
50 if (!true)
51 {
52 }
53 int myPlayer = Main.myPlayer;
54 bool netHost = Main.NetHost;
55 }
56
57 // Token: 0x06003F82 RID: 16258 RVA: 0x00240BB0 File Offset: 0x0023EDB0
59 {
60 /*
61An exception occurred when decompiling this method (06003F82)
62
63ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Chat.ChatHelper::OnlySendToPlayersWhoAreLoggedIn(System.Int32)
64
65 ---> System.Exception: Basic block has to end with unconditional control flow.
66{
67 IL_0000:
68 brtrue(IL_0000, ldc.i4:bool(1))
69}
70
71 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
72 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
73 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
74 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
75 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
76 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
77 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
78 --- End of inner exception stack trace ---
79 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
80 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
81*/;
82 }
83
84 // Token: 0x06003F83 RID: 16259 RVA: 0x00240BC0 File Offset: 0x0023EDC0
85 public static void SendChatMessageFromClient(ChatMessage message)
86 {
87 bool <IsConsumed>k__BackingField = message.<IsConsumed>k__BackingField;
88 if (<IsConsumed>k__BackingField)
89 {
90 return;
91 }
93 if (!<IsConsumed>k__BackingField)
94 {
95 }
96 }
97
98 // Token: 0x06003F84 RID: 16260 RVA: 0x00240BE4 File Offset: 0x0023EDE4
99 public static void DisplayCheckedMessage(bool result, ChatHelper.ChatRequest request)
100 {
101 if (!true)
102 {
103 }
104 byte messageAuthor = request.messageAuthor;
105 string message = request.message;
106 byte messageAuthor2 = request.messageAuthor;
107 Color color = request.color;
108 byte messageAuthor3 = request.messageAuthor;
109 string message2 = request.message;
110 string text2;
111 string text = text2 + " " + message2;
112 if (messageAuthor3 == 0)
113 {
114 }
115 bool flag = ChatHelper.ShouldCacheMessage();
116 Color color2 = request.color;
118 }
119
120 // Token: 0x06003F85 RID: 16261 RVA: 0x00240C64 File Offset: 0x0023EE64
121 public static void PlatformCheckedMessage(string message, Color color, byte messageAuthor)
122 {
123 if (!true)
124 {
125 }
126 int myPlayer = Main.myPlayer;
127 }
128
129 // Token: 0x06003F86 RID: 16262 RVA: 0x00240C8C File Offset: 0x0023EE8C
130 public static void DisplayMessage(NetworkText text, Color color, byte messageAuthor)
131 {
133 }
134
135 // Token: 0x06003F87 RID: 16263 RVA: 0x00240CAC File Offset: 0x0023EEAC
136 private static void CacheMessage(string message, Color color)
137 {
138 if (!true)
139 {
140 }
141 }
142
143 // Token: 0x06003F88 RID: 16264 RVA: 0x00240CC0 File Offset: 0x0023EEC0
144 public static void ShowCachedMessages()
145 {
146 if (!true)
147 {
148 }
149 if (!true)
150 {
151 }
152 }
153
154 // Token: 0x06003F89 RID: 16265 RVA: 0x00240D14 File Offset: 0x0023EF14
155 public static void ClearDelayedMessagesCache()
156 {
157 if (!true)
158 {
159 }
160 }
161
162 // Token: 0x06003F8A RID: 16266 RVA: 0x00240D28 File Offset: 0x0023EF28
163 private static bool ShouldCacheMessage()
164 {
165 if (!true)
166 {
167 }
168 bool netClient = Main.NetClient;
169 if (!true)
170 {
171 }
172 return Main.gameMenu;
173 }
174
175 // Token: 0x06003F8B RID: 16267 RVA: 0x00240D4C File Offset: 0x0023EF4C
176 // Note: this type is marked as 'beforefieldinit'.
177 static ChatHelper()
178 {
179 }
180
181 // Token: 0x04007DB9 RID: 32185
183
184 // Token: 0x02000795 RID: 1941
185 public class ChatRequest
186 {
187 // Token: 0x06003F8C RID: 16268 RVA: 0x00240D5C File Offset: 0x0023EF5C
188 public ChatRequest()
189 {
190 }
191
192 // Token: 0x04007DBA RID: 32186
194
195 // Token: 0x04007DBB RID: 32187
197
198 // Token: 0x04007DBC RID: 32188
200
201 // Token: 0x04007DBD RID: 32189
202 public string message;
203
204 // Token: 0x04007DBE RID: 32190
205 public Color color;
206
207 // Token: 0x04007DBF RID: 32191
208 public byte messageAuthor;
209
210 // Token: 0x04007DC0 RID: 32192
211 public bool result;
212
213 // Token: 0x02000796 RID: 1942
214 // (Invoke) Token: 0x06003F8E RID: 16270
216 }
217 }
218}
class f__AnonymousType0<< Count > j__TPar
static bool HasChatPermissions
ChatHelper.ChatRequest.ChatRequestCallback Callback
delegate void ChatRequestCallback(bool result, ChatHelper.ChatRequest request)
static List< Tuple< string, Color > > _cachedMessages
static void CacheMessage(string message, Color color)
static void SendChatMessageFromClient(ChatMessage message)
Definition ChatHelper.cs:85
static bool OnlySendToPlayersWhoAreLoggedIn(int clientIndex)
Definition ChatHelper.cs:58
static void DisplayMessageOnClient(NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:14
static void PlatformCheckedMessage(string message, Color color, byte messageAuthor)
static void ShowCachedMessages()
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:23
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
Definition ChatHelper.cs:40
static void DisplayCheckedMessage(bool result, ChatHelper.ChatRequest request)
Definition ChatHelper.cs:99
static bool ShouldCacheMessage()
static void DisplayMessage(NetworkText text, Color color, byte messageAuthor)
static void ClearDelayedMessagesCache()
static void SendChatMessageToClientAs(byte messageAuthor, NetworkText text, Color color, int playerId)
Definition ChatHelper.cs:31
static void BroadcastChatMessageAs(byte messageAuthor, NetworkText text, Color color, int excludedPlayer=-1)
Definition ChatHelper.cs:48
static NetPacket SerializeClientMessage(ChatMessage message)
static bool NetHost
Definition Main.cs:5544
static int myPlayer
Definition Main.cs:2337
static bool NetClient
Definition Main.cs:5438
static bool gameMenu
Definition Main.cs:2673