1
0
mirror of synced 2025-01-22 11:23:40 +01:00

fix vs hof delete record

This commit is contained in:
Shiroi Kitsu 2023-01-22 14:24:21 +07:00
parent cda47bf158
commit 9c7c80df0e

View File

@ -424,16 +424,21 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
break;
}
// Ghost Battle Appointment (VS HoF) (9)
// Ghost Battle Appointment (VS HoF Ghost) (9)
case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_APPOINTMENT:
{
console.log('Normal Ghost Mode Found - Appointment (VS HoF)');
console.log('OCM Ghost Mode Found - Appointment (VS HoF Ghost)');
await prisma.ghostRegisteredFromTerminal.deleteMany({
where:{
carId: Number(body.carId)
}
});
// Defeated HoF Ghost
if(body.rgResult!.opponents![0].result >= 0)
{
// Delete all the records
await prisma.ghostRegisteredFromTerminal.deleteMany({
where:{
carId: Number(body.carId)
}
});
}
break;
}