mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
工作最大等级限制&数据溢出补偿
This commit is contained in:
parent
e4979d842b
commit
152477572c
@ -52,6 +52,8 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
/// <returns>是否超模</returns>
|
/// <returns>是否超模</returns>
|
||||||
public static bool IsOverLoad(this Work work)
|
public static bool IsOverLoad(this Work work)
|
||||||
{//判断这个工作是否超模
|
{//判断这个工作是否超模
|
||||||
|
if (work.LevelLimit > 1000)
|
||||||
|
return true;
|
||||||
if (work.FinishBonus < 0)
|
if (work.FinishBonus < 0)
|
||||||
return true;
|
return true;
|
||||||
var spend = work.Spend();
|
var spend = work.Spend();
|
||||||
|
@ -43,6 +43,14 @@ namespace VPet_Simulator.Windows.Interface
|
|||||||
if (vpet != null)
|
if (vpet != null)
|
||||||
{
|
{
|
||||||
GameSave = GameSave.Load(vpet);
|
GameSave = GameSave.Load(vpet);
|
||||||
|
if (GameSave.Exp < -1000000000)
|
||||||
|
{
|
||||||
|
GameSave.Exp = 100000;
|
||||||
|
}
|
||||||
|
if (GameSave.Money < -1000000000)
|
||||||
|
{
|
||||||
|
GameSave.Money = 100000;
|
||||||
|
}
|
||||||
hash = vpet.GetInt64("hash");
|
hash = vpet.GetInt64("hash");
|
||||||
if (vpet.Remove("hash"))
|
if (vpet.Remove("hash"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user