From 6cd897b63a65e7bdc89f559e3cd1e1dacff81364 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 23 Jun 2025 22:27:35 +0200 Subject: [PATCH] track season ActivatedChallenges --- src/services/inventoryService.ts | 5 +++++ src/services/missionInventoryUpdateService.ts | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 828bb665..a2145d3b 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -88,6 +88,7 @@ import { ICalendarSeason } from "@/src/types/worldStateTypes"; import { generateNemesisProfile, INemesisProfile } from "../helpers/nemesisHelpers"; import { TAccountDocument } from "./loginService"; import { unixTimesInMs } from "../constants/timeConstants"; +import { addString } from "../helpers/stringHelpers"; export const createInventory = async ( accountOwnerId: Types.ObjectId, @@ -1784,6 +1785,10 @@ export const addChallenges = ( } else { inventory.ChallengeProgress.push({ Name, Progress }); } + + if (Name.startsWith("Calendar")) { + addString(getCalendarProgress(inventory).SeasonProgress.ActivatedChallenges, Name); + } }); const affiliationMods: IAffiliationMods[] = []; diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 09f64a9c..8a14e33c 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -634,12 +634,6 @@ export const addMissionInventoryUpdates = async ( x => x.events[0].challenge == value[value.length - 1].challenge ); checkCalendarChallengeCompletion(calendarProgress, currentSeason); - /*for (const progress of value) { - const challengeName = progress.challenge.substring(progress.challenge.lastIndexOf("/") + 1); - calendarProgress.SeasonProgress.LastCompletedDayIdx++; - calendarProgress.SeasonProgress.LastCompletedChallengeDayIdx++; - calendarProgress.SeasonProgress.ActivatedChallenges.push(challengeName); - }*/ break; } case "duviriCaveOffers": {