1
0
mirror of synced 2024-12-04 19:17:58 +01:00

fix ghost stamp getting reset

This commit is contained in:
ghkkk090 2022-08-27 21:12:49 +07:00
parent 624bc066c8
commit 4186cc255b
2 changed files with 10 additions and 8 deletions

View File

@ -60,8 +60,6 @@ model Car {
carId Int @id @default(autoincrement())
name String
manufacturer Int
regionId Int @default(0)
country String @default("JPN")
model Int
visualModel Int
customColor Int @default(0)
@ -88,6 +86,8 @@ model Car {
rivalMarker Int @default(0)
lastPlayedAt Int @default(0)
aura Int @default(0)
regionId Int @default(0)
country String @default("JPN")
// This is more data about the car
tuningPoints Int @default(0)

View File

@ -17,9 +17,10 @@ export async function sendStamp(body: wm.protobuf.SaveGameResultRequest)
if(rgResult)
{
// Stamp must bigger than 0
if(rgResult.rgStamp === 0)
let rgStamp = rgResult.rgStamp;
if(rgStamp === 0)
{
rgResult.rgStamp = 1;
rgStamp = 1;
}
// Get the area
@ -58,7 +59,7 @@ export async function sendStamp(body: wm.protobuf.SaveGameResultRequest)
let dataChallenger: any = {
carId: rgResult.opponents![i].carId,
challengerCarId: body.carId,
stamp: rgResult.rgStamp,
stamp: rgStamp,
result: rgResult.opponents![i].result,
area: area,
lastPlayedAt: date
@ -110,9 +111,10 @@ export async function shuttleReturnStamp(body: wm.protobuf.SaveGameResultRequest
if(rgResult)
{
// Stamp must bigger than 0
if(rgResult.rgStamp === 0)
let rgStamp = rgResult.rgStamp;
if(rgStamp === 0)
{
rgResult.rgStamp = 1;
rgStamp = 1;
}
// Get the area
@ -190,7 +192,7 @@ export async function shuttleReturnStamp(body: wm.protobuf.SaveGameResultRequest
let dataChallenger: any = {
carId: rgResult.opponents![i].carId,
challengerCarId: body.carId,
stamp: rgResult.rgStamp,
stamp: rgStamp,
result: rgResult.opponents![i].result,
area: area,
lastPlayedAt: date