1
0
mirror of synced 2024-11-27 16:10:53 +01:00

Synchronize VerupNo of VerupNoData2 with json

This commit is contained in:
esuo1198 2023-09-22 03:58:16 +09:00
parent 4cce75b692
commit e5678d00fd

View File

@ -60,10 +60,11 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var danData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
for (var danId = Constants.MIN_DAN_ID; danId <= Constants.MAX_DAN_ID; danId++)
{
gameDataService.GetDanDataDictionary().TryGetValue((uint)danId, out var odaiData);
danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{
InfoId = (uint)danId,
VerupNo = 1
VerupNo = odaiData is not null ? odaiData.VerupNo : 1
});
}
var verUp2Type101 = new InitialdatacheckResponse.VerupNoData2
@ -77,10 +78,11 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var gaidenDataDictionary = gameDataService.GetGaidenDataDictionary();
foreach (var gaidenId in gaidenDataDictionary.Keys)
{
gaidenDataDictionary.TryGetValue(gaidenId, out var odaiData);
gaidenData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{
InfoId = gaidenId,
VerupNo = 1
VerupNo = odaiData is not null ? odaiData.VerupNo : 1
});
}
@ -95,10 +97,11 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var eventFolderDictionary = gameDataService.GetFolderDictionary();
foreach (var folderId in eventFolderDictionary.Keys)
{
eventFolderDictionary.TryGetValue(folderId, out var folderData);
eventFolderData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{
InfoId = folderId,
VerupNo = 1
VerupNo = folderData is not null ? folderData.VerupNo : 1
});
}
var verUp2Type103 = new InitialdatacheckResponse.VerupNoData2
@ -109,22 +112,24 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
response.AryVerupNoData2s.Add(verUp2Type103);
var songIntroData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
var songIntroDictionary = gameDataService.GetSongIntroDictionary();
foreach (var setId in songIntroDictionary.Select(item => item.Value.SetId))
{
songIntroDictionary.TryGetValue(setId, out var introData);
songIntroData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{
InfoId = setId,
VerupNo = introData is not null ? introData.VerupNo : 1
});
}
var verUp2Type105 = new InitialdatacheckResponse.VerupNoData2
{
MasterType = 105,
};
for (var setId = 1; setId <= gameDataService.GetSongIntroDictionary().Count; setId++)
{
songIntroData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{
InfoId = (uint)setId,
VerupNo = 1
});
}
verUp2Type105.AryInformationDatas.AddRange(songIntroData);
response.AryVerupNoData2s.Add(verUp2Type105);
response.AryChassisFunctionIds = new uint[] {1,2,3};
response.AryChassisFunctionIds = new uint[] { 1, 2, 3 };
return Ok(response);
}