diff --git a/OshimaServers/FastAutoServer.cs b/OshimaServers/FastAutoServer.cs index cf41a6c..b386260 100644 --- a/OshimaServers/FastAutoServer.cs +++ b/OshimaServers/FastAutoServer.cs @@ -199,9 +199,9 @@ namespace Oshima.FunGame.OshimaServers foreach (Character c in inGameCharacters.Where(c => c != winner && c.HP > 0)) { SendAllGamingMessage(obj, data, "[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - actionQueue.DeathCalculation(winner, c); + await actionQueue.DeathCalculationAsync(winner, c); } - actionQueue.EndGameInfo(winner); + await actionQueue.EndGameInfo(winner); break; } @@ -219,7 +219,7 @@ namespace Oshima.FunGame.OshimaServers break; } - bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); if (isGameEnd) { break; @@ -229,7 +229,7 @@ namespace Oshima.FunGame.OshimaServers } // 模拟时间流逝 - totalTime += actionQueue.TimeLapse(); + totalTime += await actionQueue.TimeLapse(); if (actionQueue.Eliminated.Count > deaths) { diff --git a/OshimaServers/OshimaServer.cs b/OshimaServers/OshimaServer.cs index 3571b92..af51a16 100644 --- a/OshimaServers/OshimaServer.cs +++ b/OshimaServers/OshimaServer.cs @@ -18,11 +18,11 @@ namespace Oshima.FunGame.OshimaServers public override string Author => OshimaGameModuleConstant.Author; - public override void ProcessInput(string input) + public override async void ProcessInput(string input) { if (input == "fungametest") { - FunGameSimulation.StartSimulationGame(true, true); + await FunGameSimulation.StartSimulationGame(true, true); } // OSM指令 if (input.StartsWith(".osm", StringComparison.CurrentCultureIgnoreCase)) diff --git a/OshimaServers/Service/FunGameActionQueue.cs b/OshimaServers/Service/FunGameActionQueue.cs index 0480ef6..a941b62 100644 --- a/OshimaServers/Service/FunGameActionQueue.cs +++ b/OshimaServers/Service/FunGameActionQueue.cs @@ -16,7 +16,7 @@ namespace Oshima.FunGame.OshimaServers.Service private string _msg = ""; - public List StartGame(List characters, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) + public async Task> StartGame(List characters, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) { Result.Clear(); PrintOut = printout; @@ -69,9 +69,9 @@ namespace Oshima.FunGame.OshimaServers.Service foreach (Character c in characters.Where(c => c != winner && c.HP > 0)) { WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - actionQueue.DeathCalculation(winner, c); + await actionQueue.DeathCalculationAsync(winner, c); } - actionQueue.EndGameInfo(winner); + await actionQueue.EndGameInfo(winner); Result.Add(_msg); break; } @@ -86,7 +86,7 @@ namespace Oshima.FunGame.OshimaServers.Service List skillRewards = []; if (roundRewards.TryGetValue(i, out List? effectList) && effectList != null) { - skillRewards = new(effectList); + skillRewards = [.. effectList]; } WriteLine($"=== Round {i++} ==="); @@ -127,7 +127,7 @@ namespace Oshima.FunGame.OshimaServers.Service } } - bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); if (realSkillRewards.Count > 0) { @@ -172,7 +172,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = actionQueue.TimeLapse(); + double timeLapse = await actionQueue.TimeLapse(); totalTime += timeLapse; if (roundMsg != "") @@ -260,7 +260,7 @@ namespace Oshima.FunGame.OshimaServers.Service } } - public List StartTeamGame(List teams, int maxRespawnTimes = 0, int maxScoreToWin = 0, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) + public async Task> StartTeamGame(List teams, int maxRespawnTimes = 0, int maxScoreToWin = 0, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) { Result.Clear(); PrintOut = printout; @@ -330,7 +330,7 @@ namespace Oshima.FunGame.OshimaServers.Service List skillRewards = []; if (roundRewards.TryGetValue(i, out List? effectList) && effectList != null) { - skillRewards = new(effectList); + skillRewards = [.. effectList]; } WriteLine($"=== Round {i++} ==="); @@ -371,7 +371,7 @@ namespace Oshima.FunGame.OshimaServers.Service } } - bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); if (realSkillRewards.Count > 0) { @@ -419,7 +419,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = actionQueue.TimeLapse(); + double timeLapse = await actionQueue.TimeLapse(); totalTime += timeLapse; if (roundMsg != "") @@ -494,14 +494,14 @@ namespace Oshima.FunGame.OshimaServers.Service if (PrintOut) Console.WriteLine(str); } - public static List NewAndStartGame(List characters, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) + public static async Task> NewAndStartGame(List characters, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) { - return new FunGameActionQueue().StartGame(characters, printout, isWeb, deathMatchRoundDetail, showRoundEndDetail, showAllRound); + return await new FunGameActionQueue().StartGame(characters, printout, isWeb, deathMatchRoundDetail, showRoundEndDetail, showAllRound); } - public static List NewAndStartTeamGame(List teams, int maxRespawnTimes = 0, int maxScoreToWin = 0, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) + public static async Task> NewAndStartTeamGame(List teams, int maxRespawnTimes = 0, int maxScoreToWin = 0, bool printout = false, bool isWeb = false, bool deathMatchRoundDetail = false, bool showRoundEndDetail = false, bool showAllRound = false) { - return new FunGameActionQueue().StartTeamGame(teams, maxRespawnTimes, maxScoreToWin, printout, isWeb, deathMatchRoundDetail, showRoundEndDetail, showAllRound); + return await new FunGameActionQueue().StartTeamGame(teams, maxRespawnTimes, maxScoreToWin, printout, isWeb, deathMatchRoundDetail, showRoundEndDetail, showAllRound); } } } diff --git a/OshimaServers/Service/FunGameSimulation.cs b/OshimaServers/Service/FunGameSimulation.cs index 3aaf13d..5308bb9 100644 --- a/OshimaServers/Service/FunGameSimulation.cs +++ b/OshimaServers/Service/FunGameSimulation.cs @@ -53,7 +53,7 @@ namespace Oshima.FunGame.OshimaServers.Service } } - public static List StartSimulationGame(bool printout, bool isWeb = false, bool isTeam = false, bool deathMatchRoundDetail = false) + public static async Task> StartSimulationGame(bool printout, bool isWeb = false, bool isTeam = false, bool deathMatchRoundDetail = false) { PrintOut = printout; IsWeb = isWeb; @@ -76,7 +76,7 @@ namespace Oshima.FunGame.OshimaServers.Service // M = 5, W = 0, P1 = 0, P3 = 2 // M = 5, W = 1, P1 = 0, P3 = 0 - List list = new(FunGameConstant.Characters); + List list = [.. FunGameConstant.Characters]; if (list.Count > 11) { @@ -167,6 +167,7 @@ namespace Oshima.FunGame.OshimaServers.Service // 因赋予了装备,所以清除排序重新排 actionQueue.ClearQueue(); actionQueue.InitCharacterQueue(characters); + actionQueue.SetCharactersToAIControl(false, characters); if (PrintOut) Console.WriteLine(); // 团队模式 @@ -239,9 +240,9 @@ namespace Oshima.FunGame.OshimaServers.Service foreach (Character c in characters.Where(c => c != winner && c.HP > 0)) { WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。"); - actionQueue.DeathCalculation(winner, c); + await actionQueue.DeathCalculationAsync(winner, c); } - actionQueue.EndGameInfo(winner); + await actionQueue.EndGameInfo(winner); result.Add(Msg); break; } @@ -257,7 +258,7 @@ namespace Oshima.FunGame.OshimaServers.Service List skillRewards = []; if (roundRewards.TryGetValue(i, out List? effectList) && effectList != null) { - skillRewards = new(effectList); + skillRewards = [.. effectList]; } WriteLine($"=== Round {i++} ==="); @@ -298,7 +299,7 @@ namespace Oshima.FunGame.OshimaServers.Service } } - bool isGameEnd = actionQueue.ProcessTurn(characterToAct); + bool isGameEnd = await actionQueue.ProcessTurnAsync(characterToAct); if (realSkillRewards.Count > 0) { @@ -336,7 +337,7 @@ namespace Oshima.FunGame.OshimaServers.Service } // 模拟时间流逝 - double timeLapse = actionQueue.TimeLapse(); + double timeLapse = await actionQueue.TimeLapse(); totalTime += timeLapse; 下一次空投 -= timeLapse; @@ -589,10 +590,10 @@ namespace Oshima.FunGame.OshimaServers.Service { foreach (Character character in queue.Queue) { - Item[] 武器 = FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality).ToArray(); - Item[] 防具 = FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality).ToArray(); - Item[] 鞋子 = FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality).ToArray(); - Item[] 饰品 = FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality).ToArray(); + Item[] 武器 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)]; + Item[] 防具 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)]; + Item[] 鞋子 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)]; + Item[] 饰品 = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)]; Item? a = null, b = null, c = null, d = null; if (武器.Length > 0) { diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs index 364ce6f..be2e435 100644 --- a/OshimaWebAPI/Controllers/FunGameController.cs +++ b/OshimaWebAPI/Controllers/FunGameController.cs @@ -31,12 +31,12 @@ namespace Oshima.FunGame.WebAPI.Controllers [AllowAnonymous] [HttpGet("test")] - public List GetTest([FromQuery] bool? isweb = null, [FromQuery] bool? isteam = null, [FromQuery] bool? showall = null) + public async Task> GetTest([FromQuery] bool? isweb = null, [FromQuery] bool? isteam = null, [FromQuery] bool? showall = null) { bool web = isweb ?? true; bool team = isteam ?? false; bool all = showall ?? false; - return FunGameSimulation.StartSimulationGame(false, web, team, all); + return await FunGameSimulation.StartSimulationGame(false, web, team, all); } [AllowAnonymous] @@ -50,7 +50,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}"); builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}"); builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}"); @@ -105,7 +105,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}"); builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}"); builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}"); @@ -157,7 +157,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); CharacterStatistics stats = FunGameSimulation.TeamCharacterStatistics[character]; - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计参赛数:{stats.Plays}"); builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); @@ -175,7 +175,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); CharacterStatistics stats = FunGameSimulation.CharacterStatistics[character]; - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计参赛数:{stats.Plays}"); builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); @@ -202,7 +202,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); CharacterStatistics stats = FunGameSimulation.TeamCharacterStatistics[character]; - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计参赛数:{stats.Plays}"); builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); @@ -220,7 +220,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { StringBuilder builder = new(); CharacterStatistics stats = FunGameSimulation.CharacterStatistics[character]; - builder.AppendLine(character.ToString()); + builder.AppendLine(character.ToStringWithLevelWithOutUser()); builder.AppendLine($"总计参赛数:{stats.Plays}"); builder.AppendLine($"总计冠军数:{stats.Wins}"); builder.AppendLine($"胜率:{stats.Winrates * 100:0.##}%"); @@ -528,7 +528,7 @@ namespace Oshima.FunGame.WebAPI.Controllers //{ // return NetworkUtility.JsonSerialize(noSaved); //} - return NetworkUtility.JsonSerialize($"此功能维护中。"); + return NetworkUtility.JsonSerialize($"无法还原用户 {uid} 的存档,此功能维护中。"); } [HttpPost("showsaved")] @@ -1826,7 +1826,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightcustom")] - public List FightCustom([FromQuery] long? uid = null, [FromQuery] long? eqq = null, [FromQuery] bool? all = null) + public async Task> FightCustom([FromQuery] long? uid = null, [FromQuery] long? eqq = null, [FromQuery] bool? all = null) { try { @@ -1870,7 +1870,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { user1.Inventory.MainCharacter.Recovery(EP: 200); user2.Inventory.MainCharacter.Recovery(EP: 200); - return FunGameActionQueue.NewAndStartGame([user1.Inventory.MainCharacter, user2.Inventory.MainCharacter], false, false, false, false, showAllRound); + return await FunGameActionQueue.NewAndStartGame([user1.Inventory.MainCharacter, user2.Inventory.MainCharacter], false, false, false, false, showAllRound); } else { @@ -1884,7 +1884,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightcustom2")] - public List FightCustom2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null) + public async Task> FightCustom2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null) { try { @@ -1895,7 +1895,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { return [$"找不到此昵称对应的玩家!"]; } - return FightCustom(uid, enemyid, all); + return await FightCustom(uid, enemyid, all); } return [$"决斗发起失败!"]; } @@ -1906,7 +1906,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightcustomteam")] - public List FightCustomTeam([FromQuery] long? uid = null, [FromQuery] long? eqq = null, [FromQuery] bool? all = null) + public async Task> FightCustomTeam([FromQuery] long? uid = null, [FromQuery] long? eqq = null, [FromQuery] bool? all = null) { try { @@ -1968,7 +1968,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } Team team1 = new($"{user1.Username}的小队", squad1); Team team2 = new($"{user2.Username}的小队" + (userid == enemyid ? "2" : ""), squad2); - return FunGameActionQueue.NewAndStartTeamGame([team1, team2], 0, 0, false, false, false, false, showAllRound); + return await FunGameActionQueue.NewAndStartTeamGame([team1, team2], 0, 0, false, false, false, false, showAllRound); } else { @@ -1982,7 +1982,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightcustomteam2")] - public List FightCustomTeam2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null) + public async Task> FightCustomTeam2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null) { try { @@ -1993,7 +1993,7 @@ namespace Oshima.FunGame.WebAPI.Controllers { return [$"找不到此昵称对应的玩家!"]; } - return FightCustomTeam(uid, enemyid, all); + return await FightCustomTeam(uid, enemyid, all); } return [$"决斗发起失败!"]; } @@ -3437,7 +3437,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightboss")] - public List FightBoss([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null) + public async Task> FightBoss([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null) { long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11)); int bossIndex = index ?? 0; @@ -3458,7 +3458,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } Character boss2 = CharacterBuilder.Build(boss, false, true, null, FunGameConstant.AllItems, FunGameConstant.AllSkills, false); - List msgs = FunGameActionQueue.NewAndStartGame([user.Inventory.MainCharacter, boss2], false, false, false, false, showAllRound); + List msgs = await FunGameActionQueue.NewAndStartGame([user.Inventory.MainCharacter, boss2], false, false, false, false, showAllRound); if (boss2.HP <= 0) { @@ -3700,7 +3700,7 @@ namespace Oshima.FunGame.WebAPI.Controllers } [HttpPost("fightbossteam")] - public List FightBossTeam([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null) + public async Task> FightBossTeam([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null) { long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11)); int bossIndex = index ?? 0; @@ -3727,7 +3727,7 @@ namespace Oshima.FunGame.WebAPI.Controllers Character boss2 = CharacterBuilder.Build(boss, false, true, null, FunGameConstant.AllItems, FunGameConstant.AllSkills, false); Team team1 = new($"{user.Username}的小队", squad); Team team2 = new($"Boss", [boss2]); - List msgs = FunGameActionQueue.NewAndStartTeamGame([team1, team2], showAllRound: showAllRound); + List msgs = await FunGameActionQueue.NewAndStartTeamGame([team1, team2], showAllRound: showAllRound); if (boss2.HP <= 0) { @@ -4694,7 +4694,7 @@ namespace Oshima.FunGame.WebAPI.Controllers if (pc.Count > 0) { User user = FunGameService.GetUser(pc); - string msg = ""; + string msg; if (pc.TryGetValue("club", out object? value) && long.TryParse(value.ToString(), out long userClub) && userClub != 0) { @@ -5039,7 +5039,7 @@ namespace Oshima.FunGame.WebAPI.Controllers List list = []; if (pc2.TryGetValue(itemName, out object? value) && value is List tempList) { - list = new(tempList); + list = [.. tempList]; } if (list.Contains(user.Id)) diff --git a/OshimaWebAPI/Services/RainBOTService.cs b/OshimaWebAPI/Services/RainBOTService.cs index f404dd3..9f32a37 100644 --- a/OshimaWebAPI/Services/RainBOTService.cs +++ b/OshimaWebAPI/Services/RainBOTService.cs @@ -220,7 +220,7 @@ namespace Oshima.FunGame.WebAPI.Services if (!FunGameSimulation) { FunGameSimulation = true; - List msgs = Controller.GetTest(false); + List msgs = await Controller.GetTest(false); List real = []; int remain = 7; string merge = ""; @@ -268,7 +268,7 @@ namespace Oshima.FunGame.WebAPI.Services if (!FunGameSimulation) { FunGameSimulation = true; - List msgs = Controller.GetTest(false, true); + List msgs = await Controller.GetTest(false, true); List real = []; if (msgs.Count > 0) { @@ -1346,11 +1346,11 @@ namespace Oshima.FunGame.WebAPI.Services List msgs = []; if (long.TryParse(detail.Trim(), out long eqq)) { - msgs = Controller.FightCustom(uid, eqq, true); + msgs = await Controller.FightCustom(uid, eqq, true); } else { - msgs = Controller.FightCustom2(uid, detail.Trim(), true); + msgs = await Controller.FightCustom2(uid, detail.Trim(), true); } List real = []; if (msgs.Count >= 2) @@ -1404,11 +1404,11 @@ namespace Oshima.FunGame.WebAPI.Services List msgs = []; if (long.TryParse(detail.Trim(), out long eqq)) { - msgs = Controller.FightCustom(uid, eqq, false); + msgs = await Controller.FightCustom(uid, eqq, false); } else { - msgs = Controller.FightCustom2(uid, detail.Trim(), false); + msgs = await Controller.FightCustom2(uid, detail.Trim(), false); } List real = []; if (msgs.Count > 2) @@ -1455,11 +1455,11 @@ namespace Oshima.FunGame.WebAPI.Services List msgs = []; if (long.TryParse(detail.Trim(), out long eqq)) { - msgs = Controller.FightCustomTeam(uid, eqq, true); + msgs = await Controller.FightCustomTeam(uid, eqq, true); } else { - msgs = Controller.FightCustomTeam2(uid, detail.Trim(), true); + msgs = await Controller.FightCustomTeam2(uid, detail.Trim(), true); } List real = []; if (msgs.Count >= 3) @@ -1533,7 +1533,7 @@ namespace Oshima.FunGame.WebAPI.Services List msgs = []; if (int.TryParse(detail.Trim(), out int index)) { - msgs = Controller.FightBossTeam(uid, index, true); + msgs = await Controller.FightBossTeam(uid, index, true); List real = []; if (msgs.Count >= 3) { @@ -1592,7 +1592,7 @@ namespace Oshima.FunGame.WebAPI.Services List msgs = []; if (int.TryParse(detail.Trim(), out int index)) { - msgs = Controller.FightBoss(uid, index, true); + msgs = await Controller.FightBoss(uid, index, true); List real = []; if (msgs.Count >= 3) {