diff --git a/VPet-Simulator.Windows.Interface/GameSave_v2.cs b/VPet-Simulator.Windows.Interface/GameSave_v2.cs index 7fafcf2..58c8ad6 100644 --- a/VPet-Simulator.Windows.Interface/GameSave_v2.cs +++ b/VPet-Simulator.Windows.Interface/GameSave_v2.cs @@ -42,15 +42,7 @@ namespace VPet_Simulator.Windows.Interface long hash; if (vpet != null) { - GameSave = GameSave.Load(vpet); - if (GameSave.Exp < -1000000000) - { - GameSave.Exp = 100000; - } - if (GameSave.Money < -1000000000) - { - GameSave.Money = 100000; - } + GameSave = GameSave.Load(vpet); hash = vpet.GetInt64("hash"); if (vpet.Remove("hash")) { diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index b12cf94..6b77b4b 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -719,6 +719,18 @@ namespace VPet_Simulator.Windows if (tmp.GameSave.Money == 0 && tmp.GameSave.Likability == 0 && tmp.GameSave.Exp == 0 && tmp.GameSave.StrengthDrink == 0 && tmp.GameSave.StrengthFood == 0)//数据全是0,可能是bug return false; + if (tmp.GameSave.Exp < -1000000000) + { + tmp.GameSave.Exp = 1000000; + tmp.Data[(gbol)"round"] = true; + Dispatcher.Invoke(() => MessageBoxX.Show("检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正".Translate(), "数据溢出警告".Translate())); + + } + if (tmp.GameSave.Money < -1000000000) + { + tmp.GameSave.Money = 100000; + Dispatcher.Invoke(() => MessageBoxX.Show("检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正".Translate(), "数据溢出警告".Translate())); + } GameSavesData = tmp; Core.Save = tmp.GameSave; HashCheck = HashCheck; diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index 6698c4c..3b0a8f0 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -1441,7 +1441,7 @@ namespace VPet_Simulator.Windows if (oldsave.HashCheck) // 对于重开无作弊的玩家保留统计 { mw.GameSavesData.Statistics = oldsave.Statistics; - if(oldsave.GameSave.Money > 10000000 || oldsave.GameSave.Money < -1000000000 || oldsave.GameSave.Exp > 100000000 || oldsave.GameSave.Exp < -10000000000) + if (oldsave.GameSave.Money > 10000000 || oldsave.GameSave.Money < -1000000000 || oldsave.GameSave.Exp > 100000000 || oldsave.GameSave.Exp < -10000000000) { mw.Core.Save.Money = 10000; mw.Core.Save.Exp = 10000; diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps index a768d75..4d26cee 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2401.lps @@ -1,3 +1,6 @@ 由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#Due to the design of the operating system, programs launched by our software may be categorized as sub-processes of our software in the task manager, which may result in higher displayed CPU/memory usage.:| 关于CPU/内存占用显示较高的一次性提示#One-time Notice Regarding Higher Displayed CPU/Memory Usage:| -尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#Attempting to load animations and generate cache\nThis step may take a while\nPlease be patient:| \ No newline at end of file +尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#Attempting to load animations and generate cache\nThis step may take a while\nPlease be patient:| +检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected experience value exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:| +检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#Detected money exceeding 9,223,372,036 causing arithmetic overflow\nAutomatically corrected:| +数据溢出警告#Data Overflow Warning:| \ No newline at end of file diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps index 1829f98..ea53eea 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2401.lps @@ -1,3 +1,6 @@ 由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高:| 关于CPU/内存占用显示较高的一次性提示#关于CPU/内存占用显示较高的一次性提示:| -尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待:| \ No newline at end of file +尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待:| +检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正:| +检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正:| +数据溢出警告#数据溢出警告:| \ No newline at end of file diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps index 80cfd49..c16d5d3 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2401.lps @@ -1,3 +1,6 @@ 由于操作系统的设计,通过我们软件启动的程序可能会在任务管理器中归类为我们软件的子进程,这可能导致CPU/内存占用显示较高#由於操作系統的設計,透過我們軟體啟動的程序可能會在任務管理器中歸類為我們軟體的子進程,這可能導致CPU/內存占用顯示較高:| 关于CPU/内存占用显示较高的一次性提示#關於CPU/內存占用顯示較高的一次性提示:| -尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#嘗試加載動畫和生成緩存\n該步驟可能會耗時比較長\n請耐心等待:| \ No newline at end of file +尝试加载动画和生成缓存\n该步骤可能会耗时比较长\n请耐心等待#嘗試加載動畫和生成緩存\n該步驟可能會耗時比較長\n請耐心等待:| +检测到经验值超过 9,223,372,036 导致算数溢出\n已经自动回正#檢測到經驗值超過 9,223,372,036 導致算數溢出\n已經自動回正:| +检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正#檢測到金錢超過 9,223,372,036 導致算數溢出\n已經自動回正:| +数据溢出警告#數據溢出警告:| \ No newline at end of file