1
0
mirror of synced 2024-11-28 00:20: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

@ -50,20 +50,21 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var verupNo1 = new uint[] { 2, 3, 4, 5, 6, 7, 8, 13, 15, 24, 25, 26, 27, 28, 29, 30, 31, 104 }; var verupNo1 = new uint[] { 2, 3, 4, 5, 6, 7, 8, 13, 15, 24, 25, 26, 27, 28, 29, 30, 31, 104 };
var aryVerUp = verupNo1.Select(i => new InitialdatacheckResponse.VerupNoData1 var aryVerUp = verupNo1.Select(i => new InitialdatacheckResponse.VerupNoData1
{ {
MasterType = i, MasterType = i,
VerupNo = 1 VerupNo = 1
}) })
.ToList(); .ToList();
response.AryVerupNoData1s.AddRange(aryVerUp); 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 <= Constants.MAX_DAN_ID; danId++)
{ {
gameDataService.GetDanDataDictionary().TryGetValue((uint)danId, out var odaiData);
danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData danData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{ {
InfoId = (uint)danId, InfoId = (uint)danId,
VerupNo = 1 VerupNo = odaiData is not null ? odaiData.VerupNo : 1
}); });
} }
var verUp2Type101 = new InitialdatacheckResponse.VerupNoData2 var verUp2Type101 = new InitialdatacheckResponse.VerupNoData2
@ -77,10 +78,11 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
var gaidenDataDictionary = gameDataService.GetGaidenDataDictionary(); var gaidenDataDictionary = gameDataService.GetGaidenDataDictionary();
foreach (var gaidenId in gaidenDataDictionary.Keys) foreach (var gaidenId in gaidenDataDictionary.Keys)
{ {
gaidenDataDictionary.TryGetValue(gaidenId, out var odaiData);
gaidenData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData gaidenData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{ {
InfoId = gaidenId, 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(); var eventFolderDictionary = gameDataService.GetFolderDictionary();
foreach (var folderId in eventFolderDictionary.Keys) foreach (var folderId in eventFolderDictionary.Keys)
{ {
eventFolderDictionary.TryGetValue(folderId, out var folderData);
eventFolderData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData eventFolderData.Add(new InitialdatacheckResponse.VerupNoData2.InformationData
{ {
InfoId = folderId, InfoId = folderId,
VerupNo = 1 VerupNo = folderData is not null ? folderData.VerupNo : 1
}); });
} }
var verUp2Type103 = new InitialdatacheckResponse.VerupNoData2 var verUp2Type103 = new InitialdatacheckResponse.VerupNoData2
@ -109,22 +112,24 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
response.AryVerupNoData2s.Add(verUp2Type103); response.AryVerupNoData2s.Add(verUp2Type103);
var songIntroData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>(); 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 var verUp2Type105 = new InitialdatacheckResponse.VerupNoData2
{ {
MasterType = 105, 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); verUp2Type105.AryInformationDatas.AddRange(songIntroData);
response.AryVerupNoData2s.Add(verUp2Type105); response.AryVerupNoData2s.Add(verUp2Type105);
response.AryChassisFunctionIds = new uint[] {1,2,3}; response.AryChassisFunctionIds = new uint[] { 1, 2, 3 };
return Ok(response); return Ok(response);
} }