工作最大等级限制&数据溢出补偿

This commit is contained in:
ZouJin 2024-02-04 14:20:28 +08:00
parent e4979d842b
commit 152477572c
2 changed files with 10 additions and 0 deletions

View File

@ -52,6 +52,8 @@ namespace VPet_Simulator.Windows.Interface
/// <returns>是否超模</returns>
public static bool IsOverLoad(this Work work)
{//判断这个工作是否超模
if (work.LevelLimit > 1000)
return true;
if (work.FinishBonus < 0)
return true;
var spend = work.Spend();

View File

@ -43,6 +43,14 @@ namespace VPet_Simulator.Windows.Interface
if (vpet != null)
{
GameSave = GameSave.Load(vpet);
if (GameSave.Exp < -1000000000)
{
GameSave.Exp = 100000;
}
if (GameSave.Money < -1000000000)
{
GameSave.Money = 100000;
}
hash = vpet.GetInt64("hash");
if (vpet.Remove("hash"))
{