fix: use shared count for calendar day indecies #2265

Merged
OrdisPrime merged 5 commits from cal-fix-ii into main 2025-06-23 15:02:31 -07:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 6cd897b63a - Show all commits

View File

@ -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[] = [];

View File

@ -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": {