返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+14
-6
XFEstudio/SpaceNinjaServer
fix: use correct dropTable for bounty stage reward (#2263)
Re #388 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2263 Reviewed-by: Sainan <sainan@calamity.inc> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
653798b9
代码差异
1 个文件
+14
-6
@@ -1629,7 +1629,19 @@ function getRandomMissionDrops(
1629
1629
}
1630
1630
rewardManifests = [job.rewards];
1631
1631
if (job.xpAmounts.length > 1) {
1632
rotations = [RewardInfo.JobStage! % (job.xpAmounts.length - 1)];
1632
const curentStage = RewardInfo.JobStage! + 1;
1633
const totalStage = job.xpAmounts.length;
1634
let tableIndex = 1; // Stage 2, Stage 3 of 4, and Stage 3 of 5
1635
1636
if (curentStage == 1) {
1637
tableIndex = 0;
1638
} else if (curentStage == totalStage) {
1639
tableIndex = 3;
1640
} else if (totalStage == 5 && curentStage == 4) {
1641
tableIndex = 2;
1642
}
1643
1644
rotations = [tableIndex];
1633
1645
} else {
1634
1646
rotations = [0];
1635
1647
}
@@ -1638,11 +1650,7 @@ function getRandomMissionDrops(
1638
1650
(RewardInfo.JobStage === job.xpAmounts.length - 1 || job.isVault) &&
1639
1651
!isEndlessJob
1640
1652
) {
1641
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1642
if (ExportRewards[job.rewards]) {
1643
rewardManifests.push(job.rewards);
1644
rotations.push(ExportRewards[job.rewards].length - 1);
1645
}
1653
rotations.push(3);
1646
1654
}
1647
1655
}
1648
1656
}