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

gt wing fix and name check(to be test)

This commit is contained in:
anthonyng43 2024-06-02 01:59:34 +08:00
parent f84c291642
commit 3e76b041df
5 changed files with 2749 additions and 5 deletions

View File

@ -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,

View File

@ -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 = [
'',
];
// 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 }
}

View File

@ -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),

View File

@ -518,7 +518,7 @@ export default class GhostModule extends Module {
cars = wm.wm.protobuf.Car.create({
carId: 999999999, // Don't change this
name: '',
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
});

2722
yarn.lock Normal file

File diff suppressed because it is too large Load Diff