Synchronize VerupNo of VerupNoData2 with json
This commit is contained in:
parent
4cce75b692
commit
e5678d00fd
@ -24,7 +24,7 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
|
||||
Logger.LogInformation("Initial data check request: {Request}", request.Stringify());
|
||||
|
||||
var songIdMax = settings.EnableMoreSongs ? Constants.MUSIC_ID_MAX_EXPANDED : Constants.MUSIC_ID_MAX;
|
||||
|
||||
|
||||
var musicList = gameDataService.GetMusicList();
|
||||
var lockedSongsList = gameDataService.GetLockedSongsList();
|
||||
var enabledMusicList = musicList.Except(lockedSongsList);
|
||||
@ -44,26 +44,27 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
|
||||
UraReleaseBit = uraReleaseBit,
|
||||
SongIntroductionEndDatetime = DateTime.Now.AddYears(10).ToString(Constants.DATE_TIME_FORMAT),
|
||||
};
|
||||
|
||||
|
||||
var movieDataDictionary = gameDataService.GetMovieDataDictionary();
|
||||
foreach (var movieData in movieDataDictionary) response.AryMovieInfoes.Add(movieData.Value);
|
||||
|
||||
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
|
||||
{
|
||||
MasterType = i,
|
||||
VerupNo = 1
|
||||
})
|
||||
{
|
||||
MasterType = i,
|
||||
VerupNo = 1
|
||||
})
|
||||
.ToList();
|
||||
response.AryVerupNoData1s.AddRange(aryVerUp);
|
||||
|
||||
|
||||
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
|
||||
@ -72,33 +73,35 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
|
||||
};
|
||||
verUp2Type101.AryInformationDatas.AddRange(danData);
|
||||
response.AryVerupNoData2s.Add(verUp2Type101);
|
||||
|
||||
|
||||
var gaidenData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
|
||||
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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var verUp2Type102 = new InitialdatacheckResponse.VerupNoData2
|
||||
{
|
||||
MasterType = 102,
|
||||
};
|
||||
verUp2Type102.AryInformationDatas.AddRange(gaidenData);
|
||||
response.AryVerupNoData2s.Add(verUp2Type102);
|
||||
|
||||
|
||||
var eventFolderData = new List<InitialdatacheckResponse.VerupNoData2.InformationData>();
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user