1
0
mirror of https://github.com/shiroikitsu8/Bayshore_6r_legacy.git synced 2025-03-02 00:00:53 +01:00

Update game.ts

This commit is contained in:
ghkkk090 2022-08-05 22:13:33 +07:00 committed by GitHub
parent 552fe2925a
commit 2ef204c4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2496,7 +2496,7 @@ export default class GameModule extends Module {
// ---Opponent 2 & 3---
let ghostMob: wm.wm.protobuf.LoadGameHistoryResponse.GhostBattleRecord.GhostBattleRecordCar[] = [];
if(ghostHistoryData[i]?.opponent2CarId !== null || ghostHistoryData[i]?.opponent2CarId !== undefined){
if(ghostHistoryData[i]?.opponent2CarId !== null && ghostHistoryData[i]?.opponent2CarId !== undefined){
let ghostOpponentCar2 = await prisma.car.findFirst({
where: {
carId: ghostHistoryData![i].opponent2CarId!
@ -2519,7 +2519,7 @@ export default class GameModule extends Module {
result: ghostHistoryData![i].opponent2Result!
}));
}
if(ghostHistoryData[i]?.opponent3CarId !== null || ghostHistoryData[i]?.opponent3CarId !== undefined){
if(ghostHistoryData[i]?.opponent3CarId !== null && ghostHistoryData[i]?.opponent3CarId !== undefined){
let ghostOpponentCar3 = await prisma.car.findFirst({
where: {
carId: ghostHistoryData![i].opponent3CarId!