mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-21 11:29:34 +08:00
添加测试
This commit is contained in:
parent
18682bbd56
commit
91f092fa31
@ -13,9 +13,9 @@ namespace Oshima.Core.Controllers
|
|||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("[controller]")]
|
[Route("[controller]")]
|
||||||
public class FunGameController(ILogger<UserDailyController> logger) : ControllerBase
|
public class FunGameController(ILogger<FunGameController> logger) : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly ILogger<UserDailyController> _logger = logger;
|
private readonly ILogger<FunGameController> _logger = logger;
|
||||||
private const string noSaved = "你还没有创建存档!请发送【创建存档】创建。";
|
private const string noSaved = "你还没有创建存档!请发送【创建存档】创建。";
|
||||||
|
|
||||||
[HttpGet("test")]
|
[HttpGet("test")]
|
||||||
@ -551,7 +551,6 @@ namespace Oshima.Core.Controllers
|
|||||||
|
|
||||||
int characterSequence = characters.Take((showPage - 1) * 10).Count();
|
int characterSequence = characters.Take((showPage - 1) * 10).Count();
|
||||||
int itemSequence = items.Take((showPage - 1) * 10).Count() - characterSequence;
|
int itemSequence = items.Take((showPage - 1) * 10).Count() - characterSequence;
|
||||||
if (showPage > 1) itemSequence++;
|
|
||||||
|
|
||||||
foreach (int index in seq)
|
foreach (int index in seq)
|
||||||
{
|
{
|
||||||
@ -690,6 +689,7 @@ namespace Oshima.Core.Controllers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
pc.Add("user", user);
|
||||||
pc.SaveConfig();
|
pc.SaveConfig();
|
||||||
return NetworkUtility.JsonSerialize($"消耗 {reduce} {General.GameplayEquilibriumConstant.InGameCurrency},你什么也没抽中……");
|
return NetworkUtility.JsonSerialize($"消耗 {reduce} {General.GameplayEquilibriumConstant.InGameCurrency},你什么也没抽中……");
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,8 @@ namespace Oshima.Core.WebAPI
|
|||||||
FunGameSimulation.InitFunGame();
|
FunGameSimulation.InitFunGame();
|
||||||
Task taskTime = Task.Factory.StartNew(async () =>
|
Task taskTime = Task.Factory.StartNew(async () =>
|
||||||
{
|
{
|
||||||
|
bool check9 = true;
|
||||||
|
bool check15 = true;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -75,6 +77,30 @@ namespace Oshima.Core.WebAPI
|
|||||||
{
|
{
|
||||||
Daily.ClearDailys = true;
|
Daily.ClearDailys = true;
|
||||||
}
|
}
|
||||||
|
if (now.Hour == 9 && now.Minute == 0 && check9)
|
||||||
|
{
|
||||||
|
check9 = false;
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.WriteLine("\r重置物品交易冷却时间。");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Gray;
|
||||||
|
Console.Write("\r> ");
|
||||||
|
}
|
||||||
|
if (now.Hour == 9 && now.Minute == 1)
|
||||||
|
{
|
||||||
|
check9 = true;
|
||||||
|
}
|
||||||
|
if (now.Hour == 15 && now.Minute == 0 && check15)
|
||||||
|
{
|
||||||
|
check15 = false;
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.WriteLine("\r重置物品交易冷却时间。");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Gray;
|
||||||
|
Console.Write("\r> ");
|
||||||
|
}
|
||||||
|
if (now.Hour == 15 && now.Minute == 1)
|
||||||
|
{
|
||||||
|
check15 = true;
|
||||||
|
}
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -180,7 +180,11 @@ namespace Oshima.Core.Utils
|
|||||||
Skill skill = Factory.OpenFactory.GetInstance<Skill>(item.Id, item.Name, []);
|
Skill skill = Factory.OpenFactory.GetInstance<Skill>(item.Id, item.Name, []);
|
||||||
GenerateAndAddEffectsToMagicCard(skill, str, agi, intelligence);
|
GenerateAndAddEffectsToMagicCard(skill, str, agi, intelligence);
|
||||||
|
|
||||||
if (magic.Level > 1) item.Name += $" +{magic.Level - 1}";
|
if (magic.Level > 1)
|
||||||
|
{
|
||||||
|
item.Name += $" +{magic.Level - 1}";
|
||||||
|
magic.Name += $" +{magic.Level - 1}";
|
||||||
|
}
|
||||||
skill.Level = 1;
|
skill.Level = 1;
|
||||||
List<string> strings = [];
|
List<string> strings = [];
|
||||||
if (str > 0) strings.Add($"{str:0.##} 点力量");
|
if (str > 0) strings.Add($"{str:0.##} 点力量");
|
||||||
|
@ -653,7 +653,7 @@
|
|||||||
{
|
{
|
||||||
"Id": 8020,
|
"Id": 8020,
|
||||||
"mdftype": 0,
|
"mdftype": 0,
|
||||||
"mdfvalue": 0.2
|
"mdfvalue": 0.1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user