From a11b6ea3e20eaa75ec44b7b19048e643076dfb24 Mon Sep 17 00:00:00 2001 From: ghkkk090 <108461408+ghkkk090@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:39:14 +0700 Subject: [PATCH] add more ocm reward --- src/modules/ghost_ocm.ts | 61 ++ src/util/games/ghost_ocm.ts | 1154 ++++++++++++++++++----------------- src/util/games/story.ts | 2 +- 3 files changed, 650 insertions(+), 567 deletions(-) diff --git a/src/modules/ghost_ocm.ts b/src/modules/ghost_ocm.ts index 5e54189..2304eae 100644 --- a/src/modules/ghost_ocm.ts +++ b/src/modules/ghost_ocm.ts @@ -241,6 +241,7 @@ export default class GhostModule extends Module { if(checkOneParticipant) { let itemId = 0; + // 16th - C1 if(ocmEventDate.competitionId === 1) { @@ -286,6 +287,66 @@ export default class GhostModule extends Module { { itemId = 47; } + // 1st - C1 + else if(ocmEventDate.competitionId === 10) + { + itemId = 5; + } + // 2nd - Osaka + else if(ocmEventDate.competitionId === 11) + { + itemId = 11; + } + // 3rd - Fukuoka + else if(ocmEventDate.competitionId === 12) + { + itemId = 17; + } + // 4th - Nagoya + else if(ocmEventDate.competitionId === 13) + { + itemId = 23; + } + // 5th - Yaesu + else if(ocmEventDate.competitionId === 14) + { + itemId = 29; + } + // 9th - Hakone (Mt. Taikan) + else if(ocmEventDate.competitionId === 15) + { + itemId = 53; + } + // 10th - Sub-center(Shibuya/Shinjuku) + else if(ocmEventDate.competitionId === 16) + { + itemId = 93; + } + // 11th - Sub-center(Ikebukuro) + else if(ocmEventDate.competitionId === 17) + { + itemId = 99; + } + // 12th - Kobe + else if(ocmEventDate.competitionId === 18) + { + itemId = 105; + } + // 13th - New Belt Line + else if(ocmEventDate.competitionId === 19) + { + itemId = 141; + } + // 14th - Yokohama + else if(ocmEventDate.competitionId === 20) + { + itemId = 147; + } + // 15th - Hiroshima + else if(ocmEventDate.competitionId === 21) + { + itemId = 153; + } let checkNameplate = await prisma.carItem.count({ where:{ diff --git a/src/util/games/ghost_ocm.ts b/src/util/games/ghost_ocm.ts index bbc8744..d035a54 100644 --- a/src/util/games/ghost_ocm.ts +++ b/src/util/games/ghost_ocm.ts @@ -536,603 +536,625 @@ export async function ocmGiveNamePlateReward(competitionId: number) } }); - let participantLength = getCarParticipant.length; - if(getCarParticipant) { console.log('Giving OCM Rewards'); + + let participantLength = getCarParticipant.length; - // Participant is less than 100 - if(participantLength < 101) + // Participant is more than 100 + if(participantLength > 100) { - // 16th - C1 - if(competitionId === 1) - { - for(let i=0; i