diff --git a/src/modules/ghost.ts b/src/modules/ghost.ts index 25b19d5..fda1877 100644 --- a/src/modules/ghost.ts +++ b/src/modules/ghost.ts @@ -339,8 +339,8 @@ export default class GhostModule extends Module { { // Pick random car Id let randomNumber: number = Math.floor(Math.random() * car.length); - if(arr.indexOf(randomNumber) === -1){ - + if(arr.indexOf(randomNumber) === -1) + { // Push current number to array arr.push(randomNumber); diff --git a/src/util/ghost/ghost_ocm.ts b/src/util/ghost/ghost_ocm.ts index c3de04c..dd5bd6d 100644 --- a/src/util/ghost/ghost_ocm.ts +++ b/src/util/ghost/ghost_ocm.ts @@ -13,6 +13,7 @@ export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequ { periodId = periodId - 1; + // Current day is main draw and tallying qualifying period if(periodId === 0) { console.log('Tallying data from Qualifying'); @@ -28,12 +29,14 @@ export async function ocmTallying(body: wm.protobuf.LoadGhostCompetitionInfoRequ result: 'desc', } }); + let arr = []; // gbRecordTally is set if(gbRecordTally) { let top1advantage = null; let currentResult = 0; + for(let i=0; i