IIDX: Added migration code for invalid miss count records

This commit is contained in:
duel0213
2024-10-23 21:34:13 +09:00
parent ad36c48bc6
commit c3b2fab90c

View File

@@ -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<score_top>(null, {
collection: "score_top",