allow player rename
This commit is contained in:
parent
07a4d26c44
commit
99ab42c598
@ -502,6 +502,7 @@ export async function updateCar(body: wm.protobuf.UpdateCarRequest)
|
|||||||
{
|
{
|
||||||
// Car update data
|
// Car update data
|
||||||
data = {
|
data = {
|
||||||
|
name: common.sanitizeInput(cars.name),
|
||||||
customColor: common.sanitizeInput(cars.customColor),
|
customColor: common.sanitizeInput(cars.customColor),
|
||||||
wheel: common.sanitizeInput(cars.wheel),
|
wheel: common.sanitizeInput(cars.wheel),
|
||||||
wheelColor: common.sanitizeInput(cars.wheelColor),
|
wheelColor: common.sanitizeInput(cars.wheelColor),
|
||||||
|
@ -51,6 +51,7 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
|||||||
|
|
||||||
// Car update data
|
// Car update data
|
||||||
dataCar = {
|
dataCar = {
|
||||||
|
name: common.sanitizeInput(cars.name),
|
||||||
wheel: common.sanitizeInput(cars.wheel),
|
wheel: common.sanitizeInput(cars.wheel),
|
||||||
wheelColor: common.sanitizeInput(cars.wheelColor),
|
wheelColor: common.sanitizeInput(cars.wheelColor),
|
||||||
aero: common.sanitizeInput(cars.aero),
|
aero: common.sanitizeInput(cars.aero),
|
||||||
|
@ -12,14 +12,29 @@ export async function saveVersusBattleResult(body: wm.protobuf.SaveGameResultReq
|
|||||||
{
|
{
|
||||||
if (!(body.retired))
|
if (!(body.retired))
|
||||||
{
|
{
|
||||||
|
// Get the car
|
||||||
|
let cars = body?.car;
|
||||||
|
|
||||||
// Get the vs result for the car
|
// Get the vs result for the car
|
||||||
let vsResult = body?.vsResult;
|
let vsResult = body?.vsResult;
|
||||||
|
|
||||||
// vs result is set
|
// vs result is set
|
||||||
if (vsResult)
|
if (cars && vsResult)
|
||||||
{
|
{
|
||||||
// vs result update data
|
// vs result update data
|
||||||
let data : any = {
|
let data : any = {
|
||||||
|
name: common.sanitizeInput(cars.name),
|
||||||
|
wheel: common.sanitizeInput(cars.wheel),
|
||||||
|
wheelColor: common.sanitizeInput(cars.wheelColor),
|
||||||
|
aero: common.sanitizeInput(cars.aero),
|
||||||
|
bonnet: common.sanitizeInput(cars.bonnet),
|
||||||
|
wing: common.sanitizeInput(cars.wing),
|
||||||
|
mirror: common.sanitizeInput(cars.mirror),
|
||||||
|
neon: common.sanitizeInput(cars.neon),
|
||||||
|
trunk: common.sanitizeInput(cars.trunk),
|
||||||
|
plate: common.sanitizeInput(cars.plate),
|
||||||
|
plateColor: common.sanitizeInput(cars.plateColor),
|
||||||
|
plateNumber: common.sanitizeInput(cars.plateNumber),
|
||||||
vsPlayCount: common.sanitizeInput(vsResult.vsPlayCount),
|
vsPlayCount: common.sanitizeInput(vsResult.vsPlayCount),
|
||||||
vsBurstCount: common.sanitizeInput(vsResult.vsBurstCount),
|
vsBurstCount: common.sanitizeInput(vsResult.vsBurstCount),
|
||||||
vsStarCount: common.sanitizeInputNotZero(vsResult.vsStarCount),
|
vsStarCount: common.sanitizeInputNotZero(vsResult.vsStarCount),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user