mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
根据游玩时间补偿数据溢出
This commit is contained in:
parent
8cb28d52d3
commit
6b5315b793
@ -849,6 +849,20 @@ namespace VPet_Simulator.Windows
|
|||||||
tmp.GameSave.Money = 100000;
|
tmp.GameSave.Money = 100000;
|
||||||
Dispatcher.Invoke(() => MessageBoxX.Show("检测到金钱超过 9,223,372,036 导致算数溢出\n已经自动回正".Translate(), "数据溢出警告".Translate()));
|
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;
|
GameSavesData = tmp;
|
||||||
Core.Save = tmp.GameSave;
|
Core.Save = tmp.GameSave;
|
||||||
HashCheck = HashCheck;
|
HashCheck = HashCheck;
|
||||||
@ -1389,7 +1403,7 @@ namespace VPet_Simulator.Windows
|
|||||||
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "尝试加载游戏MOD".Translate()));
|
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "尝试加载游戏MOD".Translate()));
|
||||||
|
|
||||||
//旧版本设置兼容
|
//旧版本设置兼容
|
||||||
if(Set.PetGraph == "默认虚拟桌宠")
|
if (Set.PetGraph == "默认虚拟桌宠")
|
||||||
Set.PetGraph = "vup";
|
Set.PetGraph = "vup";
|
||||||
|
|
||||||
//当前桌宠动画
|
//当前桌宠动画
|
||||||
|
Loading…
Reference in New Issue
Block a user