mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-23 20:39:36 +08:00
修复签到错误问题
This commit is contained in:
parent
0f48d2ea73
commit
815a780a70
@ -3518,7 +3518,11 @@ namespace Oshima.Core.Controllers
|
|||||||
if (pc.Count > 0)
|
if (pc.Count > 0)
|
||||||
{
|
{
|
||||||
User user = FunGameService.GetUser(pc);
|
User user = FunGameService.GetUser(pc);
|
||||||
bool sign = pc.Get<bool>("signed");
|
bool sign = false;
|
||||||
|
if (pc.TryGetValue("signed", out object? value) && value is bool temp && temp)
|
||||||
|
{
|
||||||
|
sign = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (sign)
|
if (sign)
|
||||||
{
|
{
|
||||||
|
@ -680,8 +680,8 @@ namespace Oshima.Core.Utils
|
|||||||
{
|
{
|
||||||
string msg = "签到成功!本次签到获得:";
|
string msg = "签到成功!本次签到获得:";
|
||||||
int currency = Random.Shared.Next(1000, 3000);
|
int currency = Random.Shared.Next(1000, 3000);
|
||||||
msg += $"{currency} 金币和";
|
msg += $"{currency} 金币和 ";
|
||||||
int material = Random.Shared.Next(1000, 3000);
|
int material = Random.Shared.Next(5, 15);
|
||||||
msg += $"{material} 材料!额外获得:";
|
msg += $"{material} 材料!额外获得:";
|
||||||
user.Inventory.Credits += currency;
|
user.Inventory.Credits += currency;
|
||||||
user.Inventory.Materials += material;
|
user.Inventory.Materials += material;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user