diff --git a/TaikoLocalServer/Controllers/Game/AddTokenCountController.cs b/TaikoLocalServer/Controllers/Game/AddTokenCountController.cs index db67902..7b97521 100644 --- a/TaikoLocalServer/Controllers/Game/AddTokenCountController.cs +++ b/TaikoLocalServer/Controllers/Game/AddTokenCountController.cs @@ -3,7 +3,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/addtokencount.php")] +[Route("/v12r08_ww/chassis/addtokencount_7547j3o4.php")] [ApiController] public class AddTokenCountController : BaseController { diff --git a/TaikoLocalServer/Controllers/Game/BaidController.cs b/TaikoLocalServer/Controllers/Game/BaidController.cs index 265674c..a6002e9 100644 --- a/TaikoLocalServer/Controllers/Game/BaidController.cs +++ b/TaikoLocalServer/Controllers/Game/BaidController.cs @@ -5,7 +5,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; [ApiController] -[Route("/v12r08_ww/chassis/baidcheck.php")] +[Route("/v12r08_ww/chassis/baidcheck_dcfxit1u.php")] public class BaidController : BaseController { private readonly IUserDatumService userDatumService; diff --git a/TaikoLocalServer/Controllers/Game/CrownsDataController.cs b/TaikoLocalServer/Controllers/Game/CrownsDataController.cs index 1c01617..e278257 100644 --- a/TaikoLocalServer/Controllers/Game/CrownsDataController.cs +++ b/TaikoLocalServer/Controllers/Game/CrownsDataController.cs @@ -3,7 +3,7 @@ using TaikoLocalServer.Settings; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/crownsdata.php")] +[Route("/v12r08_ww/chassis/crownsdata_oqgqy90s.php")] [ApiController] public class CrownsDataController : BaseController { @@ -24,7 +24,7 @@ public class CrownsDataController : BaseController Logger.LogInformation("CrownsData request : {Request}", request.Stringify()); var songBestData = await songBestDatumService.GetAllSongBestData(request.Baid); - + var songIdMax = settings.EnableMoreSongs ? Constants.MUSIC_ID_MAX_EXPANDED : Constants.MUSIC_ID_MAX; var crown = new ushort[songIdMax + 1]; var dondafulCrown = new byte[songIdMax + 1]; @@ -38,7 +38,7 @@ public class CrownsDataController : BaseController datum.BestCrown == CrownType.Dondaful) // Calculate flag according to difficulty .Aggregate((byte)0, (flag, datum) => FlagCalculator.ComputeDondafulCrownFlag(flag, datum.Difficulty)); - + crown[songId] = songBestData // Select song of this song id with clear or fc crown .Where(datum => datum.SongId == id && diff --git a/TaikoLocalServer/Controllers/Game/ExecuteQrCodeController.cs b/TaikoLocalServer/Controllers/Game/ExecuteQrCodeController.cs index 621fe16..85c416f 100644 --- a/TaikoLocalServer/Controllers/Game/ExecuteQrCodeController.cs +++ b/TaikoLocalServer/Controllers/Game/ExecuteQrCodeController.cs @@ -1,6 +1,6 @@ namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/executeqrcode.php")] +[Route("/v12r08_ww/chassis/executeqrcode_rgowsr5m.php")] [ApiController] public class ExecuteQrCodeController : BaseController { diff --git a/TaikoLocalServer/Controllers/Game/GetAiDataController.cs b/TaikoLocalServer/Controllers/Game/GetAiDataController.cs index b91f684..125fe39 100644 --- a/TaikoLocalServer/Controllers/Game/GetAiDataController.cs +++ b/TaikoLocalServer/Controllers/Game/GetAiDataController.cs @@ -2,7 +2,7 @@ namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/getaidata.php")] +[Route("/v12r08_ww/chassis/getaidata_6x30b9nr.php")] [ApiController] public class GetAiDataController : BaseController { @@ -23,7 +23,7 @@ public class GetAiDataController : BaseController user.ThrowIfNull($"User with baid {request.Baid} does not exist!"); var response = new GetAiDataResponse { - Result = 1, + Result = 1, TotalWinnings = (uint)user.AiWinCount, InputMedian = "1000", InputVariance = "2000" diff --git a/TaikoLocalServer/Controllers/Game/GetAiScoreController.cs b/TaikoLocalServer/Controllers/Game/GetAiScoreController.cs index 137f1d0..608daa3 100644 --- a/TaikoLocalServer/Controllers/Game/GetAiScoreController.cs +++ b/TaikoLocalServer/Controllers/Game/GetAiScoreController.cs @@ -2,7 +2,7 @@ namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/getaiscore.php")] +[Route("/v12r08_ww/chassis/getaiscore_lp38po4w.php")] [ApiController] public class GetAiScoreController : BaseController { diff --git a/TaikoLocalServer/Controllers/Game/GetDanScoreController.cs b/TaikoLocalServer/Controllers/Game/GetDanScoreController.cs index 96f02cc..157235d 100644 --- a/TaikoLocalServer/Controllers/Game/GetDanScoreController.cs +++ b/TaikoLocalServer/Controllers/Game/GetDanScoreController.cs @@ -3,7 +3,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/getdanscore.php")] +[Route("/v12r08_ww/chassis/getdanscore_frqhg7q6.php")] [ApiController] public class GetDanScoreController : BaseController { @@ -44,7 +44,7 @@ public class GetDanScoreController : BaseController { responseData.AryDanScoreDataStages.Add(ObjectMappers.DanStageDbToResponseMap.Apply(stageScoreDatum)); } - + response.AryDanScoreDatas.Add(responseData); } diff --git a/TaikoLocalServer/Controllers/Game/GetScoreRankController.cs b/TaikoLocalServer/Controllers/Game/GetScoreRankController.cs index cdae812..cfe913d 100644 --- a/TaikoLocalServer/Controllers/Game/GetScoreRankController.cs +++ b/TaikoLocalServer/Controllers/Game/GetScoreRankController.cs @@ -3,14 +3,14 @@ using TaikoLocalServer.Settings; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/getscorerank.php")] +[Route("/v12r08_ww/chassis/getscorerank_1c8l7y61.php")] [ApiController] public class GetScoreRankController : BaseController { private readonly ISongBestDatumService songBestDatumService; private readonly ServerSettings settings; - + public GetScoreRankController(ISongBestDatumService songBestDatumService, IOptions settings) { this.songBestDatumService = songBestDatumService; @@ -27,7 +27,7 @@ public class GetScoreRankController : BaseController var miyabiScores = new ushort[songIdMax + 1]; var ikiScores = new ushort[songIdMax + 1]; var songBestData = await songBestDatumService.GetAllSongBestData(request.Baid); - + for (var songId = 0; songId < songIdMax; songId++) { var id = songId; @@ -35,12 +35,12 @@ public class GetScoreRankController : BaseController .Where(datum => datum.SongId == id && datum.BestScoreRank == ScoreRank.Dondaful) .Aggregate((byte)0, (flag, datum) => FlagCalculator.ComputeKiwamiScoreRankFlag(flag, datum.Difficulty)); - + ikiScores[songId] = songBestData .Where(datum => datum.SongId == id && datum.BestScoreRank is ScoreRank.White or ScoreRank.Bronze or ScoreRank.Silver) .Aggregate((ushort)0, (flag, datum) => FlagCalculator.ComputeMiyabiOrIkiScoreRank(flag, datum.BestScoreRank, datum.Difficulty)); - + miyabiScores[songId] = songBestData .Where(datum => datum.SongId == id && datum.BestScoreRank is ScoreRank.Gold or ScoreRank.Purple or ScoreRank.Sakura) @@ -53,7 +53,7 @@ public class GetScoreRankController : BaseController KiwamiScoreRankFlg = GZipBytesUtil.GetGZipBytes(kiwamiScores), MiyabiScoreRankFlg = GZipBytesUtil.GetGZipBytes(miyabiScores) }; - + return Ok(response); } } \ No newline at end of file diff --git a/TaikoLocalServer/Controllers/Game/GetTelopController.cs b/TaikoLocalServer/Controllers/Game/GetTelopController.cs index bfb0270..02a0965 100644 --- a/TaikoLocalServer/Controllers/Game/GetTelopController.cs +++ b/TaikoLocalServer/Controllers/Game/GetTelopController.cs @@ -1,6 +1,6 @@ namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/gettelop.php")] +[Route("/v12r08_ww/chassis/gettelop_o0cb2z3e.php")] [ApiController] public class GetTelopController : BaseController { @@ -12,7 +12,7 @@ public class GetTelopController : BaseController var startDateTime = DateTime.Now - TimeSpan.FromDays(999.0); var endDateTime = DateTime.Now + TimeSpan.FromDays(999.0); - + var response = new GettelopResponse { Result = 1, diff --git a/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs b/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs index 80df0de..a1bdcea 100644 --- a/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs +++ b/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs @@ -3,7 +3,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/gettokencount.php")] +[Route("/v12r08_ww/chassis/gettokencount_iut9g23g.php")] [ApiController] public class GetTokenCountController : BaseController { @@ -15,7 +15,7 @@ public class GetTokenCountController : BaseController this.userDatumService = userDatumService; this.gameDataService = gameDataService; } - + [HttpPost] [Produces("application/protobuf")] public async Task GetTokenCount([FromBody] GetTokenCountRequest request) @@ -43,12 +43,12 @@ public class GetTokenCountController : BaseController } tokenCountDict.ThrowIfNull("TokenCountDict should never be null"); - + var response = new GetTokenCountResponse { Result = 1 }; - + if (tokenCountDict.Count == 0) tokenCountDict.Add(1, 0); if (shopTokenId > 0) { @@ -71,7 +71,7 @@ public class GetTokenCountController : BaseController TokenId = castedKaTokenId }); } - + if (onePieceTokenId > 0) { var castedOnePieceTokenId = (uint)onePieceTokenId; @@ -82,7 +82,7 @@ public class GetTokenCountController : BaseController TokenId = castedOnePieceTokenId }); } - + if (soshinaTokenId > 0) { var castedSoshinaTokenId = (uint)soshinaTokenId; @@ -96,7 +96,7 @@ public class GetTokenCountController : BaseController user.TokenCountDict = JsonSerializer.Serialize(tokenCountDict); await userDatumService.UpdateUserDatum(user); - + return Ok(response); } } \ No newline at end of file diff --git a/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs b/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs index 5a029fe..80b1b7a 100644 --- a/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs +++ b/TaikoLocalServer/Controllers/Game/MyDonEntryController.cs @@ -2,7 +2,7 @@ namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/mydonentry.php")] +[Route("/v12r08_ww/chassis/mydonentry_3nrd7kwk.php")] [ApiController] public class MyDonEntryController : BaseController { diff --git a/TaikoLocalServer/Controllers/Game/PlayResultController.cs b/TaikoLocalServer/Controllers/Game/PlayResultController.cs index 8488828..5d7cb11 100644 --- a/TaikoLocalServer/Controllers/Game/PlayResultController.cs +++ b/TaikoLocalServer/Controllers/Game/PlayResultController.cs @@ -1,14 +1,13 @@ -using System.Buffers.Binary; +using GameDatabase.Entities; using System.Globalization; using System.Text.Json; -using GameDatabase.Entities; using Throw; namespace TaikoLocalServer.Controllers.Game; using StageData = PlayResultDataRequest.StageData; -[Route("/v12r08_ww/chassis/playresult.php")] +[Route("/v12r08_ww/chassis/playresult_r3ky4a4z.php")] [ApiController] public class PlayResultController : BaseController { @@ -73,11 +72,11 @@ public class PlayResultController : BaseController await UpdateDanPlayData(request, playResultData, danType); return Ok(response); } - + for (var songNumber = 0; songNumber < playResultData.AryStageInfoes.Count; songNumber++) { var stageData = playResultData.AryStageInfoes[songNumber]; - + if (stageData.IsSkipUse) { await UpdatePlayData(request, songNumber, stageData, lastPlayDatetime); @@ -192,7 +191,7 @@ public class PlayResultController : BaseController userdata.ThrowIfNull($"User data is null! Baid: {request.BaidConf}"); var playMode = (PlayMode)playResultData.PlayMode; - + userdata.Title = playResultData.Title; userdata.TitlePlateId = playResultData.TitleplateId; var costumeData = new List @@ -246,7 +245,7 @@ public class PlayResultController : BaseController playResultData.DifficultyPlayedSort }; userdata.DifficultyPlayedArray = JsonSerializer.Serialize(difficultyPlayedArray); - + userdata.AiWinCount += playResultData.AryStageInfoes.Count(data => data.IsWin); await userDatumService.UpdateUserDatum(userdata); } @@ -335,12 +334,12 @@ public class PlayResultController : BaseController await songBestDatumService.UpdateSongBestData(existing); } - + private async Task UpdateAiBattleData(PlayResultRequest request, StageData stageData) { var difficulty = (Difficulty)stageData.Level; difficulty.Throw().IfOutOfRange(); - var existing = await aiDatumService.GetSongAiScore(request.BaidConf, + var existing = await aiDatumService.GetSongAiScore(request.BaidConf, stageData.SongNo, difficulty); if (existing is null) @@ -370,7 +369,7 @@ public class PlayResultController : BaseController } else { - AddNewAiSectionScore(request,stageData,index,difficulty,existing); + AddNewAiSectionScore(request, stageData, index, difficulty, existing); } } diff --git a/TaikoLocalServer/Controllers/Game/SelfBestController.cs b/TaikoLocalServer/Controllers/Game/SelfBestController.cs index 2e860b3..efa96d9 100644 --- a/TaikoLocalServer/Controllers/Game/SelfBestController.cs +++ b/TaikoLocalServer/Controllers/Game/SelfBestController.cs @@ -3,14 +3,14 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/selfbest.php")] +[Route("/v12r08_ww/chassis/selfbest_5nz47auu.php")] [ApiController] public class SelfBestController : BaseController { private readonly ISongBestDatumService songBestDatumService; private readonly IGameDataService gameDataService; - + public SelfBestController(ISongBestDatumService songBestDatumService, IGameDataService gameDataService) { this.songBestDatumService = songBestDatumService; @@ -28,10 +28,10 @@ public class SelfBestController : BaseController Result = 1, Level = request.Level }; - + var requestDifficulty = (Difficulty)request.Level; requestDifficulty.Throw().IfOutOfRange(); - + var playerBestData = await songBestDatumService.GetAllSongBestData(request.Baid); playerBestData = playerBestData .Where(datum => datum.Difficulty == requestDifficulty || @@ -50,7 +50,7 @@ public class SelfBestController : BaseController response.ArySelfbestScores.Add(selfBestData); } response.ArySelfbestScores.Sort((data, otherData) => data.SongNo.CompareTo(otherData.SongNo)); - + return Ok(response); } diff --git a/TaikoLocalServer/Controllers/Game/SongPurchaseController.cs b/TaikoLocalServer/Controllers/Game/SongPurchaseController.cs index 7fb2e80..e2511d5 100644 --- a/TaikoLocalServer/Controllers/Game/SongPurchaseController.cs +++ b/TaikoLocalServer/Controllers/Game/SongPurchaseController.cs @@ -3,7 +3,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/songpurchase.php")] +[Route("/v12r08_ww/chassis/songpurchase_wm2fh5bl.php")] [ApiController] public class SongPurchaseController : BaseController { @@ -36,7 +36,7 @@ public class SongPurchaseController : BaseController } tokenCountDict.ThrowIfNull("TokenCountDict should never be null"); - + Logger.LogInformation("Original UnlockedSongIdList: {UnlockedSongIdList}", user.UnlockedSongIdList); var unlockedSongIdList = new List(); @@ -59,9 +59,9 @@ public class SongPurchaseController : BaseController user.TokenCountDict = JsonSerializer.Serialize(tokenCountDict); user.UnlockedSongIdList = JsonSerializer.Serialize(unlockedSongIdList); - + Logger.LogInformation("Updated UnlockedSongIdList: {UnlockedSongIdList}", user.UnlockedSongIdList); - + await userDatumService.UpdateUserDatum(user); var response = new SongPurchaseResponse diff --git a/TaikoLocalServer/Controllers/Game/UserDataController.cs b/TaikoLocalServer/Controllers/Game/UserDataController.cs index 88742bb..71689c5 100644 --- a/TaikoLocalServer/Controllers/Game/UserDataController.cs +++ b/TaikoLocalServer/Controllers/Game/UserDataController.cs @@ -6,7 +6,7 @@ using Throw; namespace TaikoLocalServer.Controllers.Game; -[Route("/v12r08_ww/chassis/userdata.php")] +[Route("/v12r08_ww/chassis/userdata_gc6x17o8.php")] [ApiController] public class UserDataController : BaseController { @@ -36,7 +36,7 @@ public class UserDataController : BaseController var songIdMax = settings.EnableMoreSongs ? Constants.MUSIC_ID_MAX_EXPANDED : Constants.MUSIC_ID_MAX; var userData = await userDatumService.GetFirstUserDatumOrDefault(request.Baid); - + var unlockedSongIdList = new List(); try { @@ -50,7 +50,7 @@ public class UserDataController : BaseController } unlockedSongIdList.ThrowIfNull("UnlockedSongIdList should never be null"); - + var musicList = gameDataService.GetMusicList(); var lockedSongsList = gameDataService.GetLockedSongsList(); lockedSongsList = lockedSongsList.Except(unlockedSongIdList).ToList(); @@ -76,7 +76,7 @@ public class UserDataController : BaseController // The only way to get a null is provide string "null" as input, // which means database content need to be fixed, so better throw toneFlg.ThrowIfNull("Tone flg should never be null!"); - + // If toneFlg is empty, add 0 to it if (toneFlg.Length == 0) {