mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-05-07 19:29:35 +08:00
添加应用
This commit is contained in:
parent
ba4921aa1f
commit
175682db38
@ -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)
|
||||
|
@ -1997,7 +1997,7 @@ namespace Oshima.FunGame.WebAPI.Services
|
||||
|
||||
if (e.Detail == "生命之泉")
|
||||
{
|
||||
string msg = NetworkUtility.JsonDeserialize<string>(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<string>(Controller.Relaod(uid)) ?? "";
|
||||
string msg = Controller.Relaod(uid);
|
||||
if (msg != "")
|
||||
{
|
||||
await SendAsync(e, "重载FunGame", msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user