1
0
mirror of synced 2024-12-05 03:27:57 +01:00

add win count

This commit is contained in:
ghkkk090 2022-07-21 12:47:15 +07:00
parent 2bac27996d
commit d12282ac9b

View File

@ -259,13 +259,14 @@ export default class GameModule extends Module {
saveEx.ghostLevel = car?.ghostLevel;
}
let winCount = 0;
let winCounter = 0;
if(body.rgResult?.rgRegionMapScore !== null && body.rgResult?.rgRegionMapScore !== undefined && body.rgResult?.rgRegionMapScore.length !== 0){
for(let i=0; i<body.rgResult.rgRegionMapScore.length; i++){
winCount += body.rgResult.rgRegionMapScore[i];
winCounter += body.rgResult.rgRegionMapScore[i];
}
}
saveEx.rgWinCount = winCount;
saveEx.rgWinCount = winCounter;
saveEx.rgScore = winCounter;
let c = await prisma.car.update({
where: {