1
0
mirror of synced 2024-11-28 00:20:53 +01:00

Sync changes

This commit is contained in:
asesidaa 2022-09-14 21:16:43 +08:00
parent 963bd1701b
commit baabb3dd72

View File

@ -1,5 +1,4 @@
using System.Collections; using TaikoLocalServer.Services.Interfaces;
using TaikoLocalServer.Services.Interfaces;
namespace TaikoLocalServer.Controllers.Game; namespace TaikoLocalServer.Controllers.Game;
@ -20,13 +19,8 @@ public class InitialDataCheckController : BaseController<InitialDataCheckControl
{ {
Logger.LogInformation("Initial data check request: {Request}", request.Stringify()); Logger.LogInformation("Initial data check request: {Request}", request.Stringify());
var enabledArray = new byte[Constants.MUSIC_FLAG_ARRAY_SIZE]; var enabledArray =
var bitSet = new BitArray(Constants.MUSIC_ID_MAX); FlagCalculator.GetBitArrayFromIds(gameDataService.GetMusicList(), Constants.MUSIC_ID_MAX, Logger);
foreach (var music in gameDataService.GetMusicList())
{
bitSet.Set((int)music, true);
}
bitSet.CopyTo(enabledArray, 0);
var danData = new List<InitialdatacheckResponse.InformationData>(); var danData = new List<InitialdatacheckResponse.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++)