mirror of
https://github.com/shiroikitsu8/Bayshore_6r_legacy.git
synced 2024-12-01 10:37:28 +01:00
Merge pull request #8 from ghkkk090/master
Update changing dress up and window sticker from terminal
This commit is contained in:
commit
ceb4be109e
@ -177,7 +177,7 @@ export default class GameModule extends Module {
|
||||
}
|
||||
case wm.wm.protobuf.GameMode.MODE_GHOST_BATTLE:
|
||||
{
|
||||
console.log(body);
|
||||
if (!(body.retired)) {
|
||||
let saveEx: any = {};
|
||||
if (body.rgResult?.rgRegionMapScore !== null && body.rgResult?.rgRegionMapScore !== undefined) {
|
||||
saveEx.rgRegionMapScore = body.rgResult?.rgRegionMapScore!;
|
||||
@ -291,6 +291,7 @@ export default class GameModule extends Module {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
await prisma.car.update({
|
||||
where: {
|
||||
carId: body.carId,
|
||||
@ -304,6 +305,7 @@ export default class GameModule extends Module {
|
||||
title: body.car!.title!,
|
||||
tunePower: body.car!.tunePower!,
|
||||
tuneHandling: body.car!.tuneHandling!,
|
||||
windowSticker: body.car!.windowSticker!,
|
||||
}
|
||||
})
|
||||
await prisma.carSettings.update({
|
||||
@ -1132,6 +1134,88 @@ export default class GameModule extends Module {
|
||||
settings: true
|
||||
}
|
||||
});
|
||||
let saveEx: any = {};
|
||||
if (body.car?.wheel !== null && body.car?.wheel !== undefined) {
|
||||
saveEx.wheel = body.car?.wheel!;
|
||||
} else {
|
||||
saveEx.wheel = car?.wheel;
|
||||
}
|
||||
if (body.car?.wheelColor !== null && body.car?.wheelColor !== undefined) {
|
||||
saveEx.wheelColor = body.car?.wheelColor!;
|
||||
} else {
|
||||
saveEx.wheelColor = car?.wheelColor;
|
||||
}
|
||||
if (body.car?.aero !== null && body.car?.aero !== undefined) {
|
||||
saveEx.aero = body.car?.aero!;
|
||||
} else {
|
||||
saveEx.aero = car?.aero;
|
||||
}
|
||||
if (body.car?.bonnet !== null && body.car?.bonnet !== undefined) {
|
||||
saveEx.bonnet = body.car?.bonnet!;
|
||||
} else {
|
||||
saveEx.bonnet = car?.bonnet;
|
||||
}
|
||||
if (body.car?.wing !== null && body.car?.wing !== undefined) {
|
||||
saveEx.wing = body.car?.wing!;
|
||||
} else {
|
||||
saveEx.wing = car?.wing;
|
||||
}
|
||||
if (body.car?.mirror !== null && body.car?.mirror !== undefined) {
|
||||
saveEx.mirror = body.car?.mirror!;
|
||||
} else {
|
||||
saveEx.mirror = car?.mirror;
|
||||
}
|
||||
if (body.car?.neon !== null && body.car?.neon !== undefined) {
|
||||
saveEx.neon = body.car?.neon!;
|
||||
} else {
|
||||
saveEx.neon = car?.neon;
|
||||
}
|
||||
if (body.car?.trunk !== null && body.car?.trunk !== undefined) {
|
||||
saveEx.trunk = body.car?.trunk!;
|
||||
} else {
|
||||
saveEx.trunk = car?.trunk;
|
||||
}
|
||||
if (body.car?.plate !== null && body.car?.plate !== undefined) {
|
||||
saveEx.plate = body.car?.plate!;
|
||||
} else {
|
||||
saveEx.plate = car?.plate;
|
||||
}
|
||||
if (body.car?.plateColor !== null && body.car?.plateColor !== undefined) {
|
||||
saveEx.plateColor = body.car?.plateColor!;
|
||||
} else {
|
||||
saveEx.plateColor = car?.plateColor;
|
||||
}
|
||||
if (body.car?.plateNumber !== null && body.car?.plateNumber !== undefined) {
|
||||
saveEx.plateNumber = body.car?.plateNumber!;
|
||||
} else {
|
||||
saveEx.plateNumber = car?.plateNumber;
|
||||
}
|
||||
if (body.car?.customColor !== null && body.car?.customColor !== undefined) {
|
||||
saveEx.customColor = body.car?.customColor!;
|
||||
} else {
|
||||
saveEx.customColor = car?.customColor;
|
||||
}
|
||||
if (body.car?.windowStickerString !== null && body.car?.windowStickerString !== undefined) {
|
||||
saveEx.windowStickerString = body.car?.windowStickerString!;
|
||||
} else {
|
||||
saveEx.windowStickerString = car?.windowStickerString;
|
||||
}
|
||||
if (body.car?.windowStickerFont !== null && body.car?.windowStickerFont !== undefined) {
|
||||
saveEx.windowStickerFont = body.car?.windowStickerFont!;
|
||||
} else {
|
||||
saveEx.windowStickerFont = car?.windowStickerFont;
|
||||
}
|
||||
if (body.car?.rivalMarker !== null && body.car?.rivalMarker !== undefined) {
|
||||
saveEx.rivalMarker = body.car?.rivalMarker!;
|
||||
} else {
|
||||
saveEx.rivalMarker = car?.rivalMarker;
|
||||
}
|
||||
if (body.car?.windowSticker !== null && body.car?.windowSticker !== undefined) {
|
||||
saveEx.windowSticker = body.car?.windowSticker!;
|
||||
} else {
|
||||
saveEx.windowSticker = car?.windowSticker;
|
||||
}
|
||||
|
||||
await prisma.carSettings.update({
|
||||
where: {
|
||||
dbId: car?.carSettingsDbId,
|
||||
@ -1141,6 +1225,13 @@ export default class GameModule extends Module {
|
||||
}
|
||||
});
|
||||
|
||||
let c = await prisma.car.update({
|
||||
where: {
|
||||
carId: body.carId
|
||||
},
|
||||
data: saveEx
|
||||
});
|
||||
|
||||
let msg = {
|
||||
error: wm.wm.protobuf.ErrorCode.ERR_SUCCESS,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user