Commit ae4e04cf authored by SherryChaos's avatar SherryChaos

fix windbot dialog path bug

parent 34e962e0
......@@ -30,6 +30,7 @@ namespace MDPro3
public GameObject btnDeck;
public static string port;
const string windbotDialogsPath = "Data/Windbot/Dialogs/";
public class BotInfo
{
......@@ -241,7 +242,25 @@ namespace MDPro3
command += " Host=" + ip;
command += " Port=" + port;
command += " HostInfo=" + password;
(new Thread(() => { Thread.Sleep(300); WindBot.Program.Main(Tools.SplitWithPreservedQuotes(command)); })).Start();
var args = Tools.SplitWithPreservedQuotes(command);
for (int i = 0; i < args.Length; i++)
{
if (args[i].StartsWith("Dialog="))
{
var path = args[i][7..];
if(!File.Exists(windbotDialogsPath + path + ".json"))
{
var config = Config.Get("Language", "zh-CN");
if (config == "en-US")
config = "default";
args[i] = "Dialog=" + config;
}
break;
}
}
(new Thread(() => { Thread.Sleep(300); WindBot.Program.Main(args); })).Start();
}
public void Launch(string command, bool lockHand, bool noCheck, bool noShuffle)
......
......@@ -250,6 +250,6 @@ Zefra Deck
AI_LV4 SUPPORT_MASTER_RULE_2020
!Tonight snack-SuperheavySamurai
Name=Tonight snack Deck=SuperheavySamurai Dialog=superheavysamurai.default
Name='Tonight snack' Deck=SuperheavySamurai Dialog=superheavysamurai.default
SuperheavySamurai Deck
AI_LV4 SUPPORT_MASTER_RULE_2020
\ No newline at end of file
......@@ -637,4 +637,5 @@ YDK 内容不合法,主卡组必须满 40 张->YDK content is illegal, the mai
注册->注册
自定义游戏->自定义游戏
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。SMAA High->SMAA High
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。
......@@ -638,3 +638,4 @@ YDK 内容不合法,主卡组必须满 40 张->YDK 内容不合法,主卡组
注册->注册
自定义游戏->自定义游戏
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。
SMAA High->SMAA High
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment