1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2025-01-19 11:18:40 +01:00

fix rgWinCount

This commit is contained in:
ghkkk090 2022-07-21 12:24:43 +07:00
parent c585661c02
commit 2bac27996d

View File

@ -259,6 +259,14 @@ export default class GameModule extends Module {
saveEx.ghostLevel = car?.ghostLevel;
}
let winCount = 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];
}
}
saveEx.rgWinCount = winCount;
let c = await prisma.car.update({
where: {
carId: body.carId