diff --git a/Dalamud/Game/Command/CommandManager.cs b/Dalamud/Game/Command/CommandManager.cs index ee4ce33db..a0c0c6243 100644 --- a/Dalamud/Game/Command/CommandManager.cs +++ b/Dalamud/Game/Command/CommandManager.cs @@ -24,6 +24,7 @@ namespace Dalamud.Game.Command private readonly Regex commandRegexJp = new(@"^そのコマンドはありません。: (?.+)$", RegexOptions.Compiled); private readonly Regex commandRegexDe = new(@"^„(?.+)“ existiert nicht als Textkommando\.$", RegexOptions.Compiled); private readonly Regex commandRegexFr = new(@"^La commande texte “(?.+)” n'existe pas\.$", RegexOptions.Compiled); + private readonly Regex commandRegexCn = new(@"^“(?.+)”出現問題:該命令不存在。$", RegexOptions.Compiled); private readonly Regex currentLangCommandRegex; /// @@ -159,6 +160,21 @@ namespace Dalamud.Game.Command var command = cmdMatch.Value; if (this.ProcessCommand(command)) isHandled = true; } + else + { + // I tried to get the start info to determine language with an else if and it failed, so this always checks instead + // Log.Debug("Trying Chinese mod pack command parse as fallback"); + // Log.Information($"Message: {message.ToString()}"); + // Japanese failed. Try Chinese as a fallback. + cmdMatch = this.commandRegexCn.Match(message.TextValue).Groups["command"]; + // Log.Information($"Success:{cmdMatch2.Success} Groups: {this.commandRegexCn.Match(message.TextValue).Groups.Keys.GetEnumerator().Current}\nValues:{cmdMatch2.Value}"); + if (cmdMatch.Success) + { + // Yes, it's a Chinese fallback chat command. + var command = cmdMatch.Value; + if (this.ProcessCommand(command)) isHandled = true; + } + } } } }