fix gt wing reset bug, and stamp sheet reset bug
This commit is contained in:
parent
8a917c4fa2
commit
bd2d615a3e
@ -575,6 +575,7 @@ export default class CarModule extends Module {
|
|||||||
|
|
||||||
// Get the request body for the update car request
|
// Get the request body for the update car request
|
||||||
let body = wm.wm.protobuf.UpdateCarRequest.decode(req.body);
|
let body = wm.wm.protobuf.UpdateCarRequest.decode(req.body);
|
||||||
|
console.log(body);
|
||||||
|
|
||||||
// Get the ghost result for the car
|
// Get the ghost result for the car
|
||||||
let cars = body?.car;
|
let cars = body?.car;
|
||||||
@ -704,26 +705,38 @@ export default class CarModule extends Module {
|
|||||||
wingTip: common.sanitizeInput(gtWing.wingTip),
|
wingTip: common.sanitizeInput(gtWing.wingTip),
|
||||||
material: common.sanitizeInput(gtWing.material),
|
material: common.sanitizeInput(gtWing.material),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await prisma.carGTWing.update({
|
||||||
|
where: {
|
||||||
|
dbId: body.carId
|
||||||
|
},
|
||||||
|
data: dataGTWing
|
||||||
|
})
|
||||||
}
|
}
|
||||||
else
|
// Check if this is in getting new custom color screen or not
|
||||||
|
else if(body.car?.carId !== null && body.car?.carId !== undefined)
|
||||||
{
|
{
|
||||||
dataGTWing = {
|
// GT Wing not set
|
||||||
pillar: 0,
|
if(gtWing === undefined || gtWing === null)
|
||||||
pillarMaterial: 0,
|
{
|
||||||
mainWing: 0,
|
dataGTWing = {
|
||||||
mainWingColor: 0,
|
pillar: 0,
|
||||||
wingTip: 0,
|
pillarMaterial: 0,
|
||||||
material: 0,
|
mainWing: 0,
|
||||||
|
mainWingColor: 0,
|
||||||
|
wingTip: 0,
|
||||||
|
material: 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
await prisma.carGTWing.update({
|
||||||
|
where: {
|
||||||
|
dbId: body.carId
|
||||||
|
},
|
||||||
|
data: dataGTWing
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await prisma.carGTWing.update({
|
|
||||||
where: {
|
|
||||||
dbId: body.carId
|
|
||||||
},
|
|
||||||
data: dataGTWing
|
|
||||||
})
|
|
||||||
|
|
||||||
// Response data
|
// Response data
|
||||||
let msg = {
|
let msg = {
|
||||||
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
|
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
|
||||||
|
@ -71,13 +71,19 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
|||||||
// ghostResult is set
|
// ghostResult is set
|
||||||
if (ghostResult)
|
if (ghostResult)
|
||||||
{
|
{
|
||||||
|
let stampSheet: any = undefined;
|
||||||
|
if(ghostResult.stampSheet!.length > 0)
|
||||||
|
{
|
||||||
|
stampSheet = ghostResult.stampSheet;
|
||||||
|
}
|
||||||
|
|
||||||
// Ghost update data
|
// Ghost update data
|
||||||
dataGhost = {
|
dataGhost = {
|
||||||
rgRegionMapScore: common.sanitizeInput(ghostResult.rgRegionMapScore),
|
rgRegionMapScore: common.sanitizeInput(ghostResult.rgRegionMapScore),
|
||||||
rgPlayCount: common.sanitizeInput(ghostResult.rgPlayCount),
|
rgPlayCount: common.sanitizeInput(ghostResult.rgPlayCount),
|
||||||
dressupLevel: common.sanitizeInput(ghostResult.dressupLevel),
|
dressupLevel: common.sanitizeInput(ghostResult.dressupLevel),
|
||||||
dressupPoint: common.sanitizeInput(ghostResult.dressupPoint),
|
dressupPoint: common.sanitizeInput(ghostResult.dressupPoint),
|
||||||
stampSheet: common.sanitizeInput(ghostResult.stampSheet),
|
stampSheet: stampSheet,
|
||||||
stampSheetCount: common.sanitizeInputNotZero(ghostResult.stampSheetCount),
|
stampSheetCount: common.sanitizeInputNotZero(ghostResult.stampSheetCount),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user