From 6b5315b793e9e02206e25efbac28d672be786ae1 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Fri, 22 Mar 2024 16:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=B8=B8=E7=8E=A9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=A1=A5=E5=81=BF=E6=95=B0=E6=8D=AE=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index 8f7a49e..a05a5f3 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -849,6 +849,20 @@ namespace VPet_Simulator.Windows tmp.GameSave.Money = 100000; Dispatcher.Invoke(() => MessageBoxX.Show("检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正".Translate(), "数据溢出警告".Translate())); } + if (tmp.Data[(gbol)"round"]) + {//根据游玩时间补偿数据溢出 + var totalhour = (int)(tmp.Statistics[(gint)"stat_total_time"] / 3600);//总计游玩时间/小时 + if (totalhour < 500) + { + tmp.GameSave.Exp += totalhour * 200; + } + else + { + double lm = Math.Sqrt(totalhour / 500); + tmp.GameSave.LevelMax = (int)lm; + tmp.GameSave.Exp += (totalhour % 500 + (lm - (int)lm) * 500) * 200; + } + } GameSavesData = tmp; Core.Save = tmp.GameSave; HashCheck = HashCheck; @@ -1389,7 +1403,7 @@ namespace VPet_Simulator.Windows await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "尝试加载游戏MOD".Translate())); //旧版本设置兼容 - if(Set.PetGraph == "默认虚拟桌宠") + if (Set.PetGraph == "默认虚拟桌宠") Set.PetGraph = "vup"; //当前桌宠动画