fix crown ghost
This commit is contained in:
parent
a11b6ea3e2
commit
388a5f9837
@ -9,7 +9,6 @@ export async function saveGhostHistory(body: wm.protobuf.SaveGameResultRequest)
|
||||
{
|
||||
console.log('Saving Ghost Battle History');
|
||||
|
||||
let updateNewTrail: boolean = true;
|
||||
let saveExGhostHistory: any = {};
|
||||
|
||||
if (body.car?.carId !== null && body.car?.carId !== undefined) {
|
||||
@ -133,9 +132,6 @@ export async function saveGhostHistory(body: wm.protobuf.SaveGameResultRequest)
|
||||
await prisma.ghostBattleRecord.create({
|
||||
data: saveExGhostHistory
|
||||
});
|
||||
|
||||
// Return the value to 'BASE_PATH/src/util/games/ghost.ts'
|
||||
return { updateNewTrail }
|
||||
}
|
||||
|
||||
|
||||
|
@ -180,7 +180,7 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
// Crown Ghost Battle Mode
|
||||
case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH:
|
||||
{
|
||||
// If not losing to the crown ghost battle
|
||||
// Not losing to the crown ghost battle
|
||||
if (body.rgResult?.acquireCrown !== false && body.rgResult?.acquireCrown)
|
||||
{
|
||||
console.log('Crown Ghost Mode Found');
|
||||
@ -315,12 +315,16 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ghost_historys = await ghost_history.saveGhostHistory(body);
|
||||
|
||||
// Update the updateNewTrail value
|
||||
updateNewTrail = ghost_historys.updateNewTrail;
|
||||
|
||||
updateNewTrail = true;
|
||||
}
|
||||
// Losing to the crown ghost battle
|
||||
else
|
||||
{
|
||||
updateNewTrail = false;
|
||||
}
|
||||
|
||||
await ghost_history.saveGhostHistory(body);
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user