1
0
mirror of synced 2025-02-17 11:18:32 +01:00

Update initial data check for dan data

This commit is contained in:
asesidaa 2023-09-10 14:11:37 +08:00
parent b23c387a29
commit 505283a003
4 changed files with 27 additions and 65 deletions

View File

@ -7,22 +7,17 @@ namespace TaikoLocalServer.Controllers.Game;
[Route("/v12r00_cn/chassis/getgenericmaster.php")] [Route("/v12r00_cn/chassis/getgenericmaster.php")]
public class GetGenericMasterController : BaseController<GetGenericMasterController> public class GetGenericMasterController : BaseController<GetGenericMasterController>
{ {
private readonly IGameDataService gameDataService;
private readonly ServerSettings settings;
[HttpPost] [HttpPost]
[Produces("application/protobuf")] [Produces("application/protobuf")]
public IActionResult GetGenericMaster([FromBody] GetGenericMasterRequest request) public IActionResult GetGenericMaster([FromBody] GetGenericMasterRequest request)
{ {
Logger.LogInformation("GetGenericMasterRequest: {Request}", request.Stringify()); Logger.LogInformation("GetGenericMasterRequest: {Request}", request.Stringify());
var response = new GetGenericMasterResponse() var response = new GetGenericMasterResponse
{ {
Result = 1, Result = 1,
VerupNo = 2, VerupNo = 2,
// EnableIdBit = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } EnableIdBit = Enumerable.Repeat((byte)1, 20).ToArray(),
EnableIdBit = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
}; };

View File

@ -31,7 +31,13 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var uraReleaseBit = var uraReleaseBit =
FlagCalculator.GetBitArrayFromIds(defaultSongWithUraList, songIdMax, Logger); FlagCalculator.GetBitArrayFromIds(defaultSongWithUraList, songIdMax, Logger);
var aryVerUp = new List<InitialdatacheckResponse.VerupNoData1>(); var verupNo1 = new uint[] { 2, 3, 4, 5, 6, 7, 8, 13, 15, 24, 25, 26, 27, 28, 29, 30, 31 };
var aryVerUp = verupNo1.Select(i => new InitialdatacheckResponse.VerupNoData1
{
MasterType = i,
VerupNo = 1
})
.ToList();
var response = new InitialdatacheckResponse var response = new InitialdatacheckResponse
{ {
@ -40,68 +46,20 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
AchievementSongBit = enabledArray, AchievementSongBit = enabledArray,
UraReleaseBit = uraReleaseBit, UraReleaseBit = uraReleaseBit,
SongIntroductionEndDatetime = DateTime.Now.AddYears(10).ToString(Constants.DATE_TIME_FORMAT), SongIntroductionEndDatetime = DateTime.Now.AddYears(10).ToString(Constants.DATE_TIME_FORMAT),
// AryAiEventDatas =
// {
// new InitialdatacheckResponse.AiEventData
// {
// AiEventId = 18,
// TokenId = 4
// }
// },
AryVerupNoData1s =
{
new InitialdatacheckResponse.VerupNoData1
{
MasterType = 1,
VerupNo = 0
},
new InitialdatacheckResponse.VerupNoData1
{
MasterType = 2,
VerupNo = 0
},
new InitialdatacheckResponse.VerupNoData1
{
MasterType = 3,
VerupNo = 0
},
new InitialdatacheckResponse.VerupNoData1
{
MasterType = 4,
VerupNo = 0
},
new InitialdatacheckResponse.VerupNoData1
{
MasterType = 5,
VerupNo = 0
}
},
// AryVerupNoData1s =
// {
// new InitialdatacheckResponse.VerupNoData2
// {
// MasterType = 3,
// AryInformationDatas =
// {
// new InitialdatacheckResponse.VerupNoData2.InformationData
// {
// InfoId = 1,
// VerupNo = 2
// }
// }
// }
// }
}; };
response.AryVerupNoData1s.AddRange(aryVerUp);
var danData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>(); var danData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
for (var danId = Constants.MIN_DAN_ID; danId <= Constants.MAX_DAN_ID; danId++) for (var danId = Constants.MIN_DAN_ID; danId <= 1; danId++)
{
danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{ {
InfoId = (uint)danId, InfoId = (uint)danId,
VerupNo = 1 VerupNo = 1
}); });
for (uint i = 0; i < 11; i++) }
var verupNo2 = new uint[] { 11, 101, 102, 103, 105 };
foreach (var i in verupNo2)
{ {
var verUp2 = new InitialdatacheckResponse.VerupNoData2 var verUp2 = new InitialdatacheckResponse.VerupNoData2
{ {
@ -110,7 +68,7 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
verUp2.AryInformationDatas.AddRange(danData); verUp2.AryInformationDatas.AddRange(danData);
response.AryVerupNoData2s.Add(verUp2); response.AryVerupNoData2s.Add(verUp2);
} }
response.AryChassisFunctionIds = new uint[] { 3 }; response.AryChassisFunctionIds = new uint[] {1,2,3};
return Ok(response); return Ok(response);

View File

@ -12,7 +12,7 @@
"TaikoLocalServer": { "TaikoLocalServer": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": false,
"launchUrl": "", "launchUrl": "",
"applicationUrl": "http://localhost:5000", "applicationUrl": "http://localhost:5000",
"environmentVariables": { "environmentVariables": {
@ -21,7 +21,7 @@
}, },
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": false,
"launchUrl": "swagger", "launchUrl": "swagger",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"

View File

@ -58,6 +58,15 @@
<None Include="Configurations\Logging.json"> <None Include="Configurations\Logging.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<Content Update="wwwroot\data\music_order.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\data\musicinfo.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\data\wordlist.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>