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
ChatCommandProcessor.cs
Go to the documentation of this file.
1using System;
6
7namespace Terraria.Chat
8{
9 // Token: 0x02000798 RID: 1944
11 {
12 // Token: 0x06003F96 RID: 16278 RVA: 0x00240DA8 File Offset: 0x0023EFA8
24
25 // Token: 0x06003F97 RID: 16279 RVA: 0x00240E20 File Offset: 0x0023F020
27 {
29 }
30
31 // Token: 0x06003F98 RID: 16280 RVA: 0x00240E34 File Offset: 0x0023F034
32 public void ClearAliases()
33 {
35 }
36
37 // Token: 0x06003F99 RID: 16281 RVA: 0x00240E48 File Offset: 0x0023F048
44
45 // Token: 0x06003F9A RID: 16282 RVA: 0x00240E64 File Offset: 0x0023F064
46 private static bool HasLocalizedCommand(ChatMessage message, LocalizedText command)
47 {
48 string <Text>k__BackingField = message.<Text>k__BackingField;
49 string text;
50 bool flag = text.StartsWith(<Text>k__BackingField);
51 int stringLength = text._stringLength;
52 int stringLength2 = <Text>k__BackingField._stringLength;
53 return true;
54 }
55
56 // Token: 0x06003F9B RID: 16283 RVA: 0x00240EA0 File Offset: 0x0023F0A0
57 private static string RemoveCommandPrefix(string messageText, LocalizedText command)
58 {
59 int stringLength = messageText._stringLength;
60 int stringLength2 = messageText._stringLength;
61 string text;
62 return text;
63 }
64
65 // Token: 0x06003F9C RID: 16284 RVA: 0x00240EC8 File Offset: 0x0023F0C8
67 {
68 /*
69An exception occurred when decompiling this method (06003F9C)
70
71ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Chat.ChatMessage Terraria.Chat.ChatCommandProcessor::CreateOutgoingMessage(System.String)
72
73 ---> System.Exception: Basic block has to end with unconditional control flow.
74{
75 IL_001C:
76 stloc:class [mscorlib]System.Collections.Generic.Dictionary`2<valuetype Terraria.Chat.ChatCommandId, class Terraria.Chat.Commands.IChatCommand>(var_4_22, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<valuetype Terraria.Chat.ChatCommandId, class Terraria.Chat.Commands.IChatCommand>(ChatCommandProcessor::_commands, ldloc:ChatCommandProcessor(this)))
77 brtrue(IL_0000, logicnot:bool(ldloc:int32[exp:bool](var_0_01)))
78}
79
80 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
81 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
82 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
83 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
84 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
85 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
86 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
87 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
88 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
89 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
90 --- End of inner exception stack trace ---
91 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
92 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
93*/;
94 }
95
96 // Token: 0x06003F9D RID: 16285 RVA: 0x00240EFC File Offset: 0x0023F0FC
98 {
100 ChatCommandId <CommandId>k__BackingField = message.<CommandId>k__BackingField;
101 string <Text>k__BackingField = message.<Text>k__BackingField;
102 }
103
104 // Token: 0x06003F9E RID: 16286 RVA: 0x00240F3C File Offset: 0x0023F13C
106 {
107 }
108
109 // Token: 0x04007DC2 RID: 32194
111
112 // Token: 0x04007DC3 RID: 32195
114
115 // Token: 0x04007DC4 RID: 32196
117
118 // Token: 0x04007DC5 RID: 32197
120
121 // Token: 0x02000799 RID: 1945
123 private sealed class <>c__DisplayClass10_0
124 {
125 // Token: 0x06003F9F RID: 16287 RVA: 0x00240F50 File Offset: 0x0023F150
127 {
128 }
129
130 // Token: 0x06003FA0 RID: 16288 RVA: 0x00240F64 File Offset: 0x0023F164
132 {
133 ChatMessage chatMessage = this.message;
134 bool flag;
135 return flag;
136 }
137
138 // Token: 0x06003FA1 RID: 16289 RVA: 0x00240F7C File Offset: 0x0023F17C
140 {
141 ChatMessage chatMessage = this.message;
142 bool flag;
143 return flag;
144 }
145
146 // Token: 0x06003FA2 RID: 16290 RVA: 0x00240F94 File Offset: 0x0023F194
148 {
149 ChatMessage chatMessage = this.message;
150 bool flag;
151 return flag;
152 }
153
154 // Token: 0x04007DC6 RID: 32198
155 public ChatMessage message;
156
157 // Token: 0x04007DC7 RID: 32199
159 }
160 }
161}
class f__AnonymousType0<< Count > j__TPar
readonly Dictionary< ChatCommandId, IChatCommand > _commands
ChatCommandProcessor AddDefaultCommand< T >()
static string RemoveCommandPrefix(string messageText, LocalizedText command)
void AddAlias(LocalizedText text, NetworkText result)
ChatMessage CreateOutgoingMessage(string text)
readonly Dictionary< LocalizedText, ChatCommandId > _localizedCommands
readonly Dictionary< LocalizedText, NetworkText > _aliases
static bool HasLocalizedCommand(ChatMessage message, LocalizedText command)
void ProcessIncomingMessage(ChatMessage message, int clientId)
static LocalizedText GetText(string key)
Definition Language.cs:44
static bool Exists(string key)
Definition Language.cs:124