From c5c1b5598368120e014adea4941899b04d2e70fa Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:15:26 +0200 Subject: [PATCH 1/2] feat: Arcana Isolation Vault rewards Closes? #388 --- package-lock.json | 8 +-- package.json | 2 +- src/services/missionInventoryUpdateService.ts | 66 ++++++++++++------- 3 files changed, 49 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fcd908d..d3d0207d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "ncp": "^2.0.0", "typescript": "^5.5", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.68", + "warframe-public-export-plus": "^0.5.69", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", @@ -3396,9 +3396,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.68", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.68.tgz", - "integrity": "sha512-KMmwCVeQ4k+EN73UZqxnM+qQdPsST8geWoJCP7US5LT6JcRxa8ptmqYXwCzaLtckBLZyVbamsxKZAxPPJckxsA==" + "version": "0.5.69", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.69.tgz", + "integrity": "sha512-vTU1tUzqpihzpseUSJMrM82pYbCDZCfW40jXIi+Ol9B3a3Acz0DccfP7i4eoXf7Abahu4H/sjRt/nSHLNBvLHA==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", diff --git a/package.json b/package.json index 35886233..ce1614ba 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "ncp": "^2.0.0", "typescript": "^5.5", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.68", + "warframe-public-export-plus": "^0.5.69", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index d343694a..3ca107da 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -1207,7 +1207,7 @@ export const addMissionRewards = async ( if (rewardInfo.JobStage != undefined && rewardInfo.jobId) { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [jobType, unkIndex, hubNode, syndicateMissionId, locationTag] = rewardInfo.jobId.split("_"); + const [jobType, unkIndex, hubNode, syndicateMissionId] = rewardInfo.jobId.split("_"); const syndicateMissions: ISyndicateMissionInfo[] = []; if (syndicateMissionId) { pushClassicBounties(syndicateMissions, idToBountyCycle(syndicateMissionId)); @@ -1216,12 +1216,25 @@ export const addMissionRewards = async ( if (syndicateEntry && syndicateEntry.Jobs) { let currentJob = syndicateEntry.Jobs[rewardInfo.JobTier!]; if (syndicateEntry.Tag === "EntratiSyndicate") { - if (jobType.endsWith("VaultBounty")) { - const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag); + if ( + [ + "DeimosRuinsExterminateBounty", + "DeimosRuinsEscortBounty", + "DeimosRuinsMistBounty", + "DeimosRuinsPurifyBounty", + "DeimosRuinsSacBounty", + "VaultBounty" + ].some(ending => jobType.endsWith(ending)) + ) { + const vault = syndicateEntry.Jobs.find(j => j.locationTag == rewardInfo.jobId!.split("_").at(-1)); if (vault) currentJob = vault; + if (jobType.endsWith("VaultBounty")) { + currentJob.xpAmounts = [currentJob.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)]; + } } - let medallionAmount = Math.floor(currentJob.xpAmounts[rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1)); - + let medallionAmount = Math.floor( + Math.min(rewardInfo.JobStage, currentJob.xpAmounts.length - 1) / (rewardInfo.Q ? 0.8 : 1) + ); if ( ["DeimosEndlessAreaDefenseBounty", "DeimosEndlessExcavateBounty", "DeimosEndlessPurifyBounty"].some( ending => jobType.endsWith(ending) @@ -1554,7 +1567,7 @@ function getRandomMissionDrops( if (RewardInfo.jobId) { if (RewardInfo.JobStage! >= 0) { // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [jobType, unkIndex, hubNode, syndicateMissionId, locationTag] = RewardInfo.jobId.split("_"); + const [jobType, unkIndex, hubNode, syndicateMissionId] = RewardInfo.jobId.split("_"); let isEndlessJob = false; if (syndicateMissionId) { const syndicateMissions: ISyndicateMissionInfo[] = []; @@ -1566,21 +1579,30 @@ function getRandomMissionDrops( let job = syndicateEntry.Jobs[RewardInfo.JobTier!]; if (syndicateEntry.Tag === "EntratiSyndicate") { - if (jobType.endsWith("VaultBounty")) { - const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag); - if (vault) job = vault; + if ( + [ + "DeimosRuinsExterminateBounty", + "DeimosRuinsEscortBounty", + "DeimosRuinsMistBounty", + "DeimosRuinsPurifyBounty", + "DeimosRuinsSacBounty", + "VaultBounty" + ].some(ending => jobType.endsWith(ending)) + ) { + const vault = syndicateEntry.Jobs.find( + j => j.locationTag === RewardInfo.jobId!.split("_").at(-1) + ); + if (vault) { + job = vault; + if (jobType.endsWith("VaultBounty")) { + job.rewards = job.rewards.replace( + "/Lotus/Types/Game/MissionDecks/", + "/Supplementals/" + ); + job.xpAmounts = [job.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)]; + } + } } - // if ( - // [ - // "DeimosRuinsExterminateBounty", - // "DeimosRuinsEscortBounty", - // "DeimosRuinsMistBounty", - // "DeimosRuinsPurifyBounty", - // "DeimosRuinsSacBounty" - // ].some(ending => jobType.endsWith(ending)) - // ) { - // job.rewards = "TODO"; // Droptable for Arcana Isolation Vault - // } if ( [ "DeimosEndlessAreaDefenseBounty", @@ -1657,10 +1679,10 @@ function getRandomMissionDrops( } if ( RewardInfo.Q && - (RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) && + (RewardInfo.JobStage === job.xpAmounts.length - 1 || jobType.endsWith("VaultBounty")) && !isEndlessJob ) { - rotations.push(3); + rotations.push(ExportRewards[job.rewards].length - 1); } } } -- 2.47.2 From a48813ba774f9831417713eda33ddbca663b9c55 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:19:45 +0200 Subject: [PATCH 2/2] Update missionInventoryUpdateService.ts --- src/services/missionInventoryUpdateService.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 3ca107da..6ab8b4e9 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -1227,9 +1227,11 @@ export const addMissionRewards = async ( ].some(ending => jobType.endsWith(ending)) ) { const vault = syndicateEntry.Jobs.find(j => j.locationTag == rewardInfo.jobId!.split("_").at(-1)); - if (vault) currentJob = vault; - if (jobType.endsWith("VaultBounty")) { - currentJob.xpAmounts = [currentJob.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)]; + if (vault) { + currentJob = vault; + if (jobType.endsWith("VaultBounty")) { + currentJob.xpAmounts = [currentJob.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)]; + } } } let medallionAmount = Math.floor( -- 2.47.2