From b4920e435b74d38ba99959337561c8ffe80512f2 Mon Sep 17 00:00:00 2001 From: Mikhail Tyukin Date: Thu, 17 Jul 2025 15:43:42 -0400 Subject: [PATCH] sync serverswitcher --- ServerSelector/ServerSwitcher.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ServerSelector/ServerSwitcher.cs b/ServerSelector/ServerSwitcher.cs index a759def..d5bb7ec 100644 --- a/ServerSelector/ServerSwitcher.cs +++ b/ServerSelector/ServerSwitcher.cs @@ -188,7 +188,7 @@ namespace ServerSelector return true; } - public static async Task SaveCfg(bool useOffical, string gamePath, string launcherPath, string ip, bool offlineMode) + public static async Task SaveCfg(bool useOffical, string gamePath, string? launcherPath, string ip, bool offlineMode) { string sodiumLib = AppDomain.CurrentDomain.BaseDirectory + "sodium.dll"; string gameSodium = gamePath + "/nikke_Data/Plugins/x86_64/sodium.dll"; @@ -368,10 +368,13 @@ namespace ServerSelector // update launcher/game ca cert list - var certList1 = await File.ReadAllTextAsync(launcherCertList); - certList1 += "\nGood SSL Ca\n===============================\n"; - certList1 += CAcert; - await File.WriteAllTextAsync(launcherCertList, certList1); + if (launcherPath != null) + { + var certList1 = await File.ReadAllTextAsync(launcherCertList); + certList1 += "\nGood SSL Ca\n===============================\n"; + certList1 += CAcert; + await File.WriteAllTextAsync(launcherCertList, certList1); + } var certList2 = await File.ReadAllTextAsync(gameCertList); certList2 += "\nGood SSL Ca\n===============================\n";