diff --git a/OshimaServers/Service/FunGameService.cs b/OshimaServers/Service/FunGameService.cs index 849fcc2..394272d 100644 --- a/OshimaServers/Service/FunGameService.cs +++ b/OshimaServers/Service/FunGameService.cs @@ -2,6 +2,7 @@ using System.Text; using Milimoe.FunGame.Core.Api.Utility; using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Library.Constant; +using Oshima.Core.Configs; using Oshima.Core.Constant; using Oshima.FunGame.OshimaModules.Characters; using Oshima.FunGame.OshimaModules.Effects.OpenEffects; @@ -2035,18 +2036,18 @@ namespace Oshima.FunGame.OshimaServers.Service { int index = Random.Shared.Next(AllItems.Count); Item item = AllItems[index].Copy(); - double price = Random.Shared.NextDouble() * 10000 * (int)item.QualityType * 20; - item.Price = price; - daily.AddItem(item, Random.Shared.Next(3)); + double price = Random.Shared.NextDouble() * 10000 * (int)item.QualityType * Random.Shared.Next(5,20); + item.Price = Calculation.Round2Digits(price); + daily.AddItem(item, Random.Shared.Next(1, 3)); } store.Add("daily", daily); - return store.ToString() + "\r\n温馨提示:使用【商店查看+序号】查看物品详细信息,使用【商店购买+序号】购买物品!每天 4:00 刷新每日商店。"; + return daily.ToString() + "\r\n温馨提示:使用【商店查看+序号】查看物品详细信息,使用【商店购买+序号】购买物品!每天 4:00 刷新每日商店。"; } else { - if (store.Count > 0) + if (store.Count > 0 && store.Where(kv => kv.Key == "daily").Select(kv => kv.Value).FirstOrDefault() is Store daily) { - return store.ToString() + "\r\n温馨提示:使用【商店查看+序号】查看物品详细信息,使用【商店购买+序号】购买物品!每天 4:00 刷新每日商店。"; + return daily.ToString() + "\r\n温馨提示:使用【商店查看+序号】查看物品详细信息,使用【商店购买+序号】购买物品!每天 4:00 刷新每日商店。"; } else { diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs index 8856419..8104368 100644 --- a/OshimaWebAPI/Controllers/FunGameController.cs +++ b/OshimaWebAPI/Controllers/FunGameController.cs @@ -4595,8 +4595,6 @@ namespace Oshima.FunGame.WebAPI.Controllers EntityModuleConfig store = new("stores", userid.ToString()); store.LoadConfig(); - FunGameService.CheckDailyStore(store); - store.SaveConfig(); string msg = ""; Store? daily = store.Get("daily"); @@ -4663,7 +4661,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } else { - return NetworkUtility.JsonSerialize($"商品列表不存在,请刷新!"); + return NetworkUtility.JsonSerialize($"商品列表为空,请使用【每日商店】指令来获取商品列表!"); } store.Add("daily", daily); @@ -4694,8 +4692,6 @@ namespace Oshima.FunGame.WebAPI.Controllers EntityModuleConfig store = new("stores", userid.ToString()); store.LoadConfig(); - FunGameService.CheckDailyStore(store); - store.SaveConfig(); string msg = ""; Store? daily = store.Get("daily");