From 29978cfd73200001ab88ef520400c927718d6fbe Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 5 Feb 2024 21:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A0=E8=BD=BD=E5=A4=87?= =?UTF-8?q?=E4=BB=BD=E5=AD=98=E6=A1=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index 3b0a8f0..245a0f0 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -1272,8 +1272,7 @@ namespace VPet_Simulator.Windows { try { - var l = new LPS(File.ReadAllText(path)); - GameSave_v2 gs = new GameSave_v2(l); + GameSave_v2 gs = new GameSave_v2(new LPS(File.ReadAllText(path))); if (MessageBoxX.Show("存档名称:{0}\n存档等级:{1}\n存档金钱:{2}\nHashCheck:{3}\n是否加载该备份存档? 当前游戏数据会丢失" .Translate(gs.GameSave.Name, gs.GameSave.Level, gs.GameSave.Money, gs.HashCheck), "是否加载该备份存档? 当前游戏数据会丢失".Translate(), MessageBoxButton.YesNo, MessageBoxIcon.Info) == MessageBoxResult.Yes) { @@ -1284,7 +1283,7 @@ namespace VPet_Simulator.Windows mw.Main.WorkTimer.Visibility = Visibility.Collapsed; mw.Main.State = Main.WorkingState.Nomal; } - if (!mw.SavesLoad(l)) + if (!mw.SavesLoad(new LPS(File.ReadAllText(path)))) MessageBoxX.Show("存档损毁,无法加载该存档\n可能是上次储存出错或Steam云同步导致的\n请在设置中加载备份还原存档", "存档损毁".Translate()); } catch (Exception ex)