add more ocm reward
This commit is contained in:
parent
e7d498f6dd
commit
a11b6ea3e2
@ -241,6 +241,7 @@ export default class GhostModule extends Module {
|
|||||||
if(checkOneParticipant)
|
if(checkOneParticipant)
|
||||||
{
|
{
|
||||||
let itemId = 0;
|
let itemId = 0;
|
||||||
|
|
||||||
// 16th - C1
|
// 16th - C1
|
||||||
if(ocmEventDate.competitionId === 1)
|
if(ocmEventDate.competitionId === 1)
|
||||||
{
|
{
|
||||||
@ -286,6 +287,66 @@ export default class GhostModule extends Module {
|
|||||||
{
|
{
|
||||||
itemId = 47;
|
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({
|
let checkNameplate = await prisma.carItem.count({
|
||||||
where:{
|
where:{
|
||||||
|
@ -536,259 +536,24 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let participantLength = getCarParticipant.length;
|
|
||||||
|
|
||||||
if(getCarParticipant)
|
if(getCarParticipant)
|
||||||
{
|
{
|
||||||
console.log('Giving OCM Rewards');
|
console.log('Giving OCM Rewards');
|
||||||
|
|
||||||
// Participant is less than 100
|
let participantLength = getCarParticipant.length;
|
||||||
if(participantLength < 101)
|
|
||||||
{
|
|
||||||
// 16th - C1
|
|
||||||
if(competitionId === 1)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Fantasy)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 204,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Unicorn)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 205,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 17th - Osaka
|
|
||||||
else if(competitionId === 2)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Tread Pattern)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 210,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Griffon)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 211,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 18th - Fukuoka
|
|
||||||
else if(competitionId === 3)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (City)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 216,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Wyvern)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 217,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 19th - Nagoya
|
|
||||||
else if(competitionId === 4)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Tribal)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 222,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Gargoyle)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 223,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 6th - C1
|
|
||||||
else if(competitionId === 5)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Silver Craft)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 35,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Bear)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 36,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 20th - Kobe
|
|
||||||
else if(competitionId === 6)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Gemstone)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 228,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Minotaur)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 229,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 7th - Fukutoshin
|
|
||||||
else if(competitionId === 7)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Koi)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 41,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Crocodile)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 42,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 21st - Hiroshima
|
|
||||||
else if(competitionId === 8)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Ukiyo-e)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 234,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Cerberus)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 235,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 8th - Hakone
|
|
||||||
else if(competitionId === 9)
|
|
||||||
{
|
|
||||||
for(let i=0; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Studs)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 47,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ranking within the top 100 (Elephant)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 48,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Participant is more than 100
|
// Participant is more than 100
|
||||||
else
|
if(participantLength > 100)
|
||||||
{
|
{
|
||||||
|
participantLength = 100
|
||||||
|
}
|
||||||
|
|
||||||
// 16th - C1
|
// 16th - C1
|
||||||
if(competitionId === 1)
|
if(competitionId === 1)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Fantasy)
|
// Participation Award (Fantasy)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -797,8 +562,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Unicorn)
|
// Ranking within the top 100 (Unicorn GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -808,26 +576,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Fantasy)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 204,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 17th - Osaka
|
// 17th - Osaka
|
||||||
else if(competitionId === 2)
|
else if(competitionId === 2)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Tread Pattern)
|
// Participation Award (Tread Pattern)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -836,8 +591,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Griffon)
|
// Ranking within the top 100 (Griffon GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -847,26 +605,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Tread Pattern)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 210,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 18th - Fukuoka
|
// 18th - Fukuoka
|
||||||
else if(competitionId === 3)
|
else if(competitionId === 3)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (City)
|
// Participation Award (City)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -875,8 +620,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Wyvern)
|
// Ranking within the top 100 (Wyvern GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -886,26 +634,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (City)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 216,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 19th - Nagoya
|
// 19th - Nagoya
|
||||||
else if(competitionId === 4)
|
else if(competitionId === 4)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Tribal)
|
// Participation Award (Tribal)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -914,8 +649,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Gargoyle)
|
// Ranking within the top 100 (Gargoyle GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -925,26 +663,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Tribal)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 222,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 6th - C1
|
// 6th - C1
|
||||||
else if(competitionId === 5)
|
else if(competitionId === 5)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Silver Craft)
|
// Participation Award (Silver Craft)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -953,8 +678,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Bear)
|
// Ranking within the top 100 (Bear GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -964,26 +692,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Silver Craft)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 35,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 20th - Kobe
|
// 20th - Kobe
|
||||||
else if(competitionId === 6)
|
else if(competitionId === 6)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Gemstone)
|
// Participation Award (Gemstone)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -992,8 +707,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Minotaur)
|
// Ranking within the top 100 (Minotaur GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1003,26 +721,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Gemstone)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 228,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 7th - Fukutoshin
|
// 7th - Fukutoshin
|
||||||
else if(competitionId === 7)
|
else if(competitionId === 7)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Koi)
|
// Participation Award (Koi)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1031,8 +736,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Crocodile)
|
// Ranking within the top 100 (Crocodile GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1042,26 +750,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Koi)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 41,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 21st - Hiroshima
|
// 21st - Hiroshima
|
||||||
else if(competitionId === 8)
|
else if(competitionId === 8)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Ukiyo-e)
|
// Participation Award (Ukiyo-e)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1070,8 +765,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Cerberus)
|
// Ranking within the top 100 (Cerberus GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1081,26 +779,13 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for(let i=101; i<participantLength; i++)
|
|
||||||
{
|
|
||||||
// Participation Award (Ukiyo-e)
|
|
||||||
await prisma.carItem.create({
|
|
||||||
data:{
|
|
||||||
carId: getCarParticipant[i].carId,
|
|
||||||
category: 17,
|
|
||||||
itemId: 234,
|
|
||||||
amount: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 8th - Hakone
|
// 8th - Hakone
|
||||||
else if(competitionId === 9)
|
else if(competitionId === 9)
|
||||||
{
|
|
||||||
for(let i=0; i<101; i++)
|
|
||||||
{
|
{
|
||||||
// Participation Award (Studs)
|
// Participation Award (Studs)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1109,8 +794,11 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Ranking within the top 100 (Elephant)
|
// Ranking within the top 100 (Elephant GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
@ -1120,19 +808,353 @@ export async function ocmGiveNamePlateReward(competitionId: number)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for(let i=101; i<participantLength; i++)
|
// 1st - C1
|
||||||
|
else if(competitionId === 10)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
{
|
{
|
||||||
// Participation Award (Studs)
|
|
||||||
await prisma.carItem.create({
|
await prisma.carItem.create({
|
||||||
data:{
|
data:{
|
||||||
carId: getCarParticipant[i].carId,
|
carId: getCarParticipant[i].carId,
|
||||||
category: 17,
|
category: 17,
|
||||||
itemId: 47,
|
itemId: 5,
|
||||||
amount: 1
|
amount: 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 6,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 2nd - Osaka
|
||||||
|
else if(competitionId === 11)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 11,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 12,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 3rd - Fukuoka
|
||||||
|
else if(competitionId === 12)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 17,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 18,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 4th - Nagoya
|
||||||
|
else if(competitionId === 13)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 23,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 24,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 5th - Yaesu
|
||||||
|
else if(competitionId === 14)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 29,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 30,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 9th - Hakone (Mt. Taikan)
|
||||||
|
else if(competitionId === 15)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 53,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 54,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 10th - Sub-center(Shibuya/Shinjuku)
|
||||||
|
else if(competitionId === 16)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 93,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 94,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 11th - Sub-center(Ikebukuro)
|
||||||
|
else if(competitionId === 17)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 99,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 100,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 12th - Kobe
|
||||||
|
else if(competitionId === 18)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 105,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 106,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 13th - New Belt Line
|
||||||
|
else if(competitionId === 19)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 141,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 142,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 14th - Yokohama
|
||||||
|
else if(competitionId === 20)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 147,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 148,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 15th - Hiroshima
|
||||||
|
else if(competitionId === 21)
|
||||||
|
{
|
||||||
|
// Participation Award (// TODO: name this)
|
||||||
|
for(let i=0; i<getCarParticipant.length; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 153,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ranking within the top 100 (// TODO: name this GP)
|
||||||
|
for(let i=0; i<participantLength; i++)
|
||||||
|
{
|
||||||
|
await prisma.carItem.create({
|
||||||
|
data:{
|
||||||
|
carId: getCarParticipant[i].carId,
|
||||||
|
category: 17,
|
||||||
|
itemId: 154,
|
||||||
|
amount: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ export async function saveStoryResult(body: wm.protobuf.SaveGameResultRequest, c
|
|||||||
data.stClearBits = storyResult.stClearBits;
|
data.stClearBits = storyResult.stClearBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calling give meter reward function (BASE_PATH/src/util/meter_reward.ts)
|
// Calling check step function (BASE_PATH/src/util/games/games_util/check_step.ts)
|
||||||
let check_steps = await check_step.checkCurrentStep(body);
|
let check_steps = await check_step.checkCurrentStep(body);
|
||||||
|
|
||||||
// Set the ghost level to the correct level
|
// Set the ghost level to the correct level
|
||||||
|
Loading…
x
Reference in New Issue
Block a user