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