fix: additional checks in bounty rewards #1626
@ -922,7 +922,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo, tierOverride: number | u
|
|||||||
|
|
||||||
if (syndicateEntry.Tag === "EntratiSyndicate") {
|
if (syndicateEntry.Tag === "EntratiSyndicate") {
|
||||||
const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag);
|
const vault = syndicateEntry.Jobs.find(j => j.locationTag === locationTag);
|
||||||
if (vault) job = vault;
|
if (vault && locationTag) job = vault;
|
||||||
// if (
|
// if (
|
||||||
// [
|
// [
|
||||||
// "DeimosRuinsExterminateBounty",
|
// "DeimosRuinsExterminateBounty",
|
||||||
@ -997,12 +997,14 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo, tierOverride: number | u
|
|||||||
(RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) &&
|
(RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) &&
|
||||||
!isEndlessJob
|
!isEndlessJob
|
||||||
) {
|
) {
|
||||||
|
if (ExportRewards[job.rewards]) {
|
||||||
rewardManifests.push(job.rewards);
|
rewardManifests.push(job.rewards);
|
||||||
|
|||||||
rotations.push(ExportRewards[job.rewards].length - 1);
|
rotations.push(ExportRewards[job.rewards].length - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (RewardInfo.challengeMissionId) {
|
} else if (RewardInfo.challengeMissionId) {
|
||||||
const rewardTables: Record<string, string[]> = {
|
const rewardTables: Record<string, string[]> = {
|
||||||
EntratiLabSyndicate: [
|
EntratiLabSyndicate: [
|
||||||
@ -1053,9 +1055,12 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo, tierOverride: number | u
|
|||||||
if (rewardManifests.length != 0) {
|
if (rewardManifests.length != 0) {
|
||||||
logger.debug(`generating random mission rewards`, { rewardManifests, rotations });
|
logger.debug(`generating random mission rewards`, { rewardManifests, rotations });
|
||||||
}
|
}
|
||||||
rewardManifests
|
rewardManifests.forEach(name => {
|
||||||
.map(name => ExportRewards[name])
|
const table = ExportRewards[name];
|
||||||
.forEach(table => {
|
if (!table) {
|
||||||
|
logger.error(`unknown droptable: ${name}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (const rotation of rotations) {
|
for (const rotation of rotations) {
|
||||||
const rotationRewards = table[rotation];
|
const rotationRewards = table[rotation];
|
||||||
const drop = getRandomRewardByChance(rotationRewards);
|
const drop = getRandomRewardByChance(rotationRewards);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
Sorry, this line just confuses the fuck out of me. Why are you doing
rewardManifests.push(job.rewards);
when just a few lines earlier you haverewardManifests = [job.rewards];
? Surely this is not intentional?When player doesn't fail any bonus objective
Q
stays true, and if this is lastJobStage
then we should giveadditional
reward for thatJobStage
. That why there is push