From 815a780a70cd070c401cf4b0188d6fa23dd58db7 Mon Sep 17 00:00:00 2001 From: milimoe Date: Wed, 1 Jan 2025 03:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AD=BE=E5=88=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaCore/Controllers/FunGameController.cs | 6 +++++- OshimaCore/Utils/FunGameService.cs | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/OshimaCore/Controllers/FunGameController.cs b/OshimaCore/Controllers/FunGameController.cs index e88415b..ea61a53 100644 --- a/OshimaCore/Controllers/FunGameController.cs +++ b/OshimaCore/Controllers/FunGameController.cs @@ -3518,7 +3518,11 @@ namespace Oshima.Core.Controllers if (pc.Count > 0) { User user = FunGameService.GetUser(pc); - bool sign = pc.Get("signed"); + bool sign = false; + if (pc.TryGetValue("signed", out object? value) && value is bool temp && temp) + { + sign = true; + } if (sign) { diff --git a/OshimaCore/Utils/FunGameService.cs b/OshimaCore/Utils/FunGameService.cs index 2eaf4c9..d9fae3c 100644 --- a/OshimaCore/Utils/FunGameService.cs +++ b/OshimaCore/Utils/FunGameService.cs @@ -680,8 +680,8 @@ namespace Oshima.Core.Utils { string msg = "签到成功!本次签到获得:"; int currency = Random.Shared.Next(1000, 3000); - msg += $"{currency} 金币和"; - int material = Random.Shared.Next(1000, 3000); + msg += $"{currency} 金币和 "; + int material = Random.Shared.Next(5, 15); msg += $"{material} 材料!额外获得:"; user.Inventory.Credits += currency; user.Inventory.Materials += material;