From ab23f99e6c93b7b0d6a4efcbedc3b8cc26347490 Mon Sep 17 00:00:00 2001 From: Shiroi Kitsu <108461408+shiroikitsu8@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:47:04 +0700 Subject: [PATCH] also delete the challenge hof ghost when lost --- src/modules/game/ghost.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/modules/game/ghost.ts b/src/modules/game/ghost.ts index bee51a1..02f0cc3 100644 --- a/src/modules/game/ghost.ts +++ b/src/modules/game/ghost.ts @@ -442,16 +442,12 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ { console.log('OCM Ghost Mode Found - Appointment (VS HoF Ghost)'); - // Defeated HoF Ghost - if(body.rgResult!.opponents![0].result >= 0) - { - // Delete all the records - await prisma.ghostRegisteredFromTerminal.deleteMany({ - where:{ - carId: Number(body.carId) - } - }); - } + // Delete all the records + await prisma.ghostRegisteredFromTerminal.deleteMany({ + where:{ + carId: Number(body.carId) + } + }); break; }