diff --git a/src/modules/ghost.ts b/src/modules/ghost.ts index 5e66151..3246504 100644 --- a/src/modules/ghost.ts +++ b/src/modules/ghost.ts @@ -716,45 +716,11 @@ export default class GhostModule extends Module { // Get the trail data let ghost_trails = await ghost_trail.getOCMGhostTrail(pCarId, pTrailId); - // Qualifiers or Main Draw OCM - if(ghost_trails.ghostFound === true) - { - pArea = ghost_trails.areaVal; - rampVal = ghost_trails.rampVal; - pathVal = ghost_trails.pathVal; - playedAt = ghost_trails.playedAt; - ghostTrail = ghost_trails.ghostTrail; - } - // HoF OCM - else - { - console.log("Getting HoF Ghost Trail") - - let ghost_trail = await prisma.oCMTop1GhostTrail.findFirst({ - where:{ - dbId: pTrailId - } - }); - - if(ghost_trail) - { - pArea = ghost_trail.area; - rampVal = ghost_trail.ramp; - pathVal = ghost_trail.path; - playedAt = ghost_trail.playedAt; - ghostTrail = ghost_trail.trail; - } - // HoF Not Found - else - { - pArea = ghost_trails.areaVal; - rampVal = ghost_trails.rampVal; - pathVal = ghost_trails.pathVal; - playedAt = ghost_trails.playedAt; - ghostTrail = ghost_trails.ghostTrail; - } - - } + pArea = ghost_trails.areaVal; + rampVal = ghost_trails.rampVal; + pathVal = ghost_trails.pathVal; + playedAt = ghost_trails.playedAt; + ghostTrail = ghost_trails.ghostTrail; } // Query parameter from Crown Ghost Battle available else diff --git a/src/util/ghost/ghost_trail.ts b/src/util/ghost/ghost_trail.ts index d36da57..69ba498 100644 --- a/src/util/ghost/ghost_trail.ts +++ b/src/util/ghost/ghost_trail.ts @@ -98,7 +98,6 @@ export async function getOCMGhostTrail(carId: number, trailId: number) let pathVal = 0; let playedAt = 0; let ghostTrail; - let ghostFound: boolean = false; // Trails data for certain area is available if(ghost_trails) @@ -119,9 +118,6 @@ export async function getOCMGhostTrail(carId: number, trailId: number) // Set to OCM trail data ghostTrail = ghost_trails!.trail; - - // Set OCM ghost trail found - ghostFound = true; } // Trails data for certain area is not available else @@ -141,7 +137,7 @@ export async function getOCMGhostTrail(carId: number, trailId: number) ghostTrail = new Uint8Array([1, 2, 3, 4]); } - return { areaVal, rampVal, pathVal, playedAt, ghostTrail, ghostFound } + return { areaVal, rampVal, pathVal, playedAt, ghostTrail } }