gt wing fix and name check(to be test)
This commit is contained in:
parent
f84c291642
commit
3e76b041df
@ -108,7 +108,7 @@ export default class CarModule extends Module {
|
||||
|
||||
// Check created car and item used
|
||||
let checkCreatedCars = await carFunctions.checkCreatedCar(body, carInsert, itemId);
|
||||
if(checkCreatedCars.cheated === true)
|
||||
if((checkCreatedCars.cheated === true) || (checkCreatedCars.slurName === true))
|
||||
{
|
||||
let msg = {
|
||||
error: wm.wm.protobuf.ErrorCode.ERR_FORBIDDEN,
|
||||
|
@ -703,10 +703,26 @@ export async function updateCarCustomWing(body: wm.protobuf.UpdateCarRequest)
|
||||
}
|
||||
|
||||
|
||||
// Remove Used Ticket
|
||||
// Check Create Car
|
||||
export async function checkCreatedCar(body: wm.protobuf.CreateCarRequest, car: any, itemId: number)
|
||||
{
|
||||
let cheated: boolean = false;
|
||||
let slurName: boolean = false;
|
||||
|
||||
let allSlurName = [
|
||||
'CUNNY',
|
||||
];
|
||||
|
||||
// Check if user item id is not set and its a special car
|
||||
for(let i=0; i<allSlurName.length; i++)
|
||||
{
|
||||
if(car.name === allSlurName[i])
|
||||
{
|
||||
slurName = true;
|
||||
|
||||
return { slurName }
|
||||
}
|
||||
}
|
||||
|
||||
let allCarVisualModel = [
|
||||
1, // ZR1T
|
||||
@ -824,5 +840,5 @@ export async function checkCreatedCar(body: wm.protobuf.CreateCarRequest, car: a
|
||||
cheated = true;
|
||||
}
|
||||
|
||||
return { cheated }
|
||||
return { cheated, slurName }
|
||||
}
|
@ -49,6 +49,12 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
}
|
||||
}
|
||||
|
||||
// Error handling for equiping GT Wing in game after race
|
||||
if(cars.wing > 127)
|
||||
{
|
||||
cars.wing = 127
|
||||
}
|
||||
|
||||
// Car update data
|
||||
dataCar = {
|
||||
name: common.sanitizeInput(cars.name),
|
||||
|
@ -518,7 +518,7 @@ export default class GhostModule extends Module {
|
||||
cars = wm.wm.protobuf.Car.create({
|
||||
carId: 999999999, // Don't change this
|
||||
name: 'S660',
|
||||
regionId: 18, // IDN (福井)
|
||||
regionId: Math.floor(Math.random() * 47) + 1, // Random Region, old code -> // 18, // IDN (福井)
|
||||
manufacturer: 12, // HONDA
|
||||
model: 105, // S660 [JW5]
|
||||
visualModel: 130, // S660 [JW5]
|
||||
@ -545,7 +545,7 @@ export default class GhostModule extends Module {
|
||||
title: 'Don\'t have S660?',
|
||||
level: 65, // SSSSS
|
||||
lastPlayedAt: checkGhostTrail!.playedAt,
|
||||
country: 'IDN',
|
||||
country: 'JPN', // Change to JPN, old code -> 'IDN',
|
||||
lastPlayedPlace: playedPlace
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user