Compare commits

...

3 Commits

Author SHA1 Message Date
e361d7ee5c make the array optional
All checks were successful
Build / build (pull_request) Successful in 1m18s
Build / build (push) Successful in 1m6s
2025-04-09 20:55:17 +02:00
2187b1cae5 some better noting
All checks were successful
Build / build (pull_request) Successful in 42s
Build / build (push) Successful in 1m6s
2025-04-09 20:47:28 +02:00
8e4f507780 feat: track EudicoHeists in CompletedJobChains
All checks were successful
Build / build (push) Successful in 1m18s
Build / build (pull_request) Successful in 43s
2025-04-09 20:42:19 +02:00
4 changed files with 31 additions and 2 deletions

View File

@ -1414,7 +1414,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//https://warframe.fandom.com/wiki/Heist //https://warframe.fandom.com/wiki/Heist
//ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name //ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name
CompletedJobChains: [completedJobChainsSchema], CompletedJobChains: { type: [completedJobChainsSchema], default: undefined },
//Night Wave Challenge //Night Wave Challenge
SeasonChallengeHistory: [seasonChallengeHistorySchema], SeasonChallengeHistory: [seasonChallengeHistorySchema],

View File

@ -143,6 +143,28 @@ export const addMissionInventoryUpdates = async (
if (inventoryUpdates.RewardInfo.NemesisAbandonedRewards) { if (inventoryUpdates.RewardInfo.NemesisAbandonedRewards) {
inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards; inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
} }
if (inventoryUpdates.MissionStatus == "GS_SUCCESS" && inventoryUpdates.RewardInfo.jobId) {
// e.g. for Profit-Taker Phase 1:
// JobTier: -6,
// jobId: '/Lotus/Types/Gameplay/Venus/Jobs/Heists/HeistProfitTakerBountyOne_-6_SolarisUnitedHub1_663a71c80000000000000025_EudicoHeists',
// This is sent multiple times, with JobStage starting at 0 and incrementing each time, but only the final upload has GS_SUCCESS.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [bounty, tier, hub, id, tag] = inventoryUpdates.RewardInfo.jobId.split("_");
if (tag == "EudicoHeists") {
inventory.CompletedJobChains ??= [];
let chain = inventory.CompletedJobChains.find(x => x.LocationTag == tag);
if (!chain) {
chain =
inventory.CompletedJobChains[
inventory.CompletedJobChains.push({ LocationTag: tag, Jobs: [] }) - 1
];
}
if (!chain.Jobs.includes(bounty)) {
chain.Jobs.push(bounty);
}
}
}
} }
for (const [key, value] of getEntriesUnsafe(inventoryUpdates)) { for (const [key, value] of getEntriesUnsafe(inventoryUpdates)) {
if (value === undefined) { if (value === undefined) {

View File

@ -292,7 +292,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
RecentVendorPurchases?: IRecentVendorPurchaseClient[]; RecentVendorPurchases?: IRecentVendorPurchaseClient[];
NodeIntrosCompleted: string[]; NodeIntrosCompleted: string[];
GuildId?: IOid; GuildId?: IOid;
CompletedJobChains: ICompletedJobChain[]; CompletedJobChains?: ICompletedJobChain[];
SeasonChallengeHistory: ISeasonChallenge[]; SeasonChallengeHistory: ISeasonChallenge[];
EquippedInstrument?: string; EquippedInstrument?: string;
InvasionChainProgress: IInvasionChainProgress[]; InvasionChainProgress: IInvasionChainProgress[];

View File

@ -143,6 +143,13 @@ export interface IRewardInfo {
PurgatoryRewardQualifications?: string; PurgatoryRewardQualifications?: string;
rewardSeed?: number; rewardSeed?: number;
periodicMissionTag?: string; periodicMissionTag?: string;
// for bounties, only EOM_AFK and node are given from above, plus:
JobTier?: string;
jobId?: string;
JobStage?: string;
Q?: boolean; // always false?
CheckpointCounter?: number; // starts at 1, is incremented with each job stage upload, and does not reset when starting a new job
} }
export type IMissionStatus = "GS_SUCCESS" | "GS_FAILURE" | "GS_DUMPED" | "GS_QUIT" | "GS_INTERRUPTED"; export type IMissionStatus = "GS_SUCCESS" | "GS_FAILURE" | "GS_DUMPED" | "GS_QUIT" | "GS_INTERRUPTED";