diff --git a/src/util/games/ghost.ts b/src/util/games/ghost.ts index 8ef0280..b671e67 100644 --- a/src/util/games/ghost.ts +++ b/src/util/games/ghost.ts @@ -112,6 +112,7 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ switch (body.rgResult!.selectionMethod) { + // Ghost Battle by Level case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_BY_LEVEL: { console.log('Normal Ghost Mode Found'); @@ -124,6 +125,70 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ break; } + // Ghost Battle by Name + case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_NAME: + { + console.log('Normal Ghost Mode Found'); + + ghost_historys = await ghost_history.saveGhostHistory(body); + + // Update the updateNewTrail value + updateNewTrail = ghost_historys.updateNewTrail; + + break; + } + + // Ghost Battle by Region + case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_REGION: + { + console.log('Normal Ghost Mode Found'); + + ghost_historys = await ghost_history.saveGhostHistory(body); + + // Update the updateNewTrail value + updateNewTrail = ghost_historys.updateNewTrail; + + break; + } + + // Ghost Battle from History + case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_FROM_HISTORY: + { + console.log('Normal Ghost Mode Found'); + + ghost_historys = await ghost_history.saveGhostHistory(body); + + // Update the updateNewTrail value + updateNewTrail = ghost_historys.updateNewTrail; + + break; + } + + // Ghost Battle by Shop + case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_SHOP: + { + console.log('Normal Ghost Mode Found'); + + ghost_historys = await ghost_history.saveGhostHistory(body); + + // Update the updateNewTrail value + updateNewTrail = ghost_historys.updateNewTrail; + + break; + } + + case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SEARCH_BY_NAME: + { + console.log('Normal Ghost Mode Found'); + + ghost_historys = await ghost_history.saveGhostHistory(body); + + // Update the updateNewTrail value + updateNewTrail = ghost_historys.updateNewTrail; + + break; + } + // Crown Ghost Battle Mode case wmproto.wm.protobuf.GhostSelectionMethod.GHOST_SELECT_CROWN_MATCH: {