1
0
mirror of synced 2024-11-12 01:10:47 +01:00

Merge pull request #31 from ghkkk090/master

add gap between qualifying and main draw if the gap is less than 1 hour
This commit is contained in:
Luna 2022-08-20 08:52:33 +01:00 committed by GitHub
commit e134df4df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

Binary file not shown.

View File

@ -103,15 +103,17 @@ export default class GhostModule extends Module {
competitionPeriodStartTimestamp = competitionPeriodEndTimeStamp + ocmEventDate.lengthOfInterval;
}
if(ocmEventDate.lengthOfInterval !== 0)
// Check the gap between quali close and main draw start timestamp
let checkQualiMainGap = ocmEventDate.competitionStartAt - ocmEventDate.qualifyingPeriodCloseAt;
if(checkQualiMainGap < 3600)
{
let qualifyingEndTimeStamp = ocmEventDate.qualifyingPeriodCloseAt - ocmEventDate.lengthOfInterval
let changeTime = ocmEventDate.competitionStartAt - 3600;
await prisma.oCMEvent.update({
where:{
dbId: ocmEventDate.dbId
},
data:{
qualifyingPeriodCloseAt: qualifyingEndTimeStamp
qualifyingPeriodCloseAt: changeTime
}
})
}
@ -574,7 +576,7 @@ export default class GhostModule extends Module {
windowSticker: true,
windowStickerString: '',
windowStickerFont: 0,
title: 'You don\'t have S660? LMAO',
title: 'Don\'t have S660?',
level: 65, // SSSSS
lastPlayedAt: checkGhostTrail!.playedAt,
country: 'GLB'

View File

@ -1,2 +1,2 @@
yarn dev
node dist
pause