From c3b2fab90c2ac407e9d6e6d966ae86b33cf7157b Mon Sep 17 00:00:00 2001 From: duel0213 Date: Wed, 23 Oct 2024 21:34:13 +0900 Subject: [PATCH] IIDX: Added migration code for invalid miss count records --- iidx@asphyxia/handlers/music.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iidx@asphyxia/handlers/music.ts b/iidx@asphyxia/handlers/music.ts index aa7774c..ef95ea1 100644 --- a/iidx@asphyxia/handlers/music.ts +++ b/iidx@asphyxia/handlers/music.ts @@ -552,6 +552,12 @@ export const musicreg: EPR = async (info, data, send) => { cArray[clid] = Math.max(cArray[clid], cflg); } + // migration for invalid miss count // + // if EXSCORE/MISS COUNT is 0 and CLEAR FLAG is NO PLAY then set MISS COUNT to -1 // + for (let a = 0; a < mArray.length; a++) { + if (esArray[a] == 0 && cArray[a] == 0 && mArray[a] == 0) mArray[a] = -1; + } + if (version >= 27) { // TODO:: support old version // const score_top: score_top | null = await DB.FindOne(null, { collection: "score_top",