diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs index a59182e..cf417bf 100644 --- a/OshimaWebAPI/Controllers/FunGameController.cs +++ b/OshimaWebAPI/Controllers/FunGameController.cs @@ -5166,14 +5166,18 @@ namespace Oshima.FunGame.WebAPI.Controllers int dead = user.Inventory.Characters.Count(c => c.HP <= 0); int halfdown = user.Inventory.Characters.Count(c => (c.HP / c.MaxHP) < 0.5 && c.HP > 0); - int halfup = user.Inventory.Characters.Count(c => (c.HP / c.MaxHP) >= 0.5); + int halfup = user.Inventory.Characters.Count(c => (c.HP / c.MaxHP) >= 0.5 && c.HP != c.MaxHP); double deadNeed = 10000 * dead; double halfdownNeed = 6000 * halfdown; double halfupNeed = 2000 * halfup; double total = deadNeed + halfdownNeed + halfupNeed; - if (user.Inventory.Credits >= total) + if (total == 0) + { + msg = $"你暂时不需要生命之泉的服务,欢迎下次光临。"; + } + else if (user.Inventory.Credits >= total) { user.Inventory.Credits -= total; foreach (Character character in user.Inventory.Characters) diff --git a/OshimaWebAPI/Services/RainBOTService.cs b/OshimaWebAPI/Services/RainBOTService.cs index a4fe1eb..fb00a25 100644 --- a/OshimaWebAPI/Services/RainBOTService.cs +++ b/OshimaWebAPI/Services/RainBOTService.cs @@ -1997,7 +1997,7 @@ namespace Oshima.FunGame.WebAPI.Services if (e.Detail == "生命之泉") { - string msg = NetworkUtility.JsonDeserialize(Controller.SpringOfLife()) ?? ""; + string msg = Controller.SpringOfLife(uid); if (msg != "") { await SendAsync(e, "生命之泉", string.Join("\r\n", msg)); @@ -2007,7 +2007,7 @@ namespace Oshima.FunGame.WebAPI.Services if (uid == GeneralSettings.Master && e.Detail.StartsWith("重载FunGame", StringComparison.CurrentCultureIgnoreCase)) { - string msg = NetworkUtility.JsonDeserialize(Controller.Relaod(uid)) ?? ""; + string msg = Controller.Relaod(uid); if (msg != "") { await SendAsync(e, "重载FunGame", msg);