XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: use 0 index for vault bounty medalion reward (#4389)

Fixes #4388 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4389 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

0644f367
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

1 个文件 +5 -3
Modified src/services/missionInventoryUpdateService.ts +5 -3
@@ -1515,7 +1515,9 @@ export const addMissionRewards = async (
1515 1515 const currentJob = result.currentJob;
1516 1516 const syndicateTag = result.syndicateTag;
1517 1517 if (syndicateTag === "EntratiSyndicate") {
1518 let medallionAmount = Math.floor(currentJob.xpAmounts[rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1));
1518 let medallionAmount = Math.floor(
1519 currentJob.xpAmounts[currentJob.isVault ? 0 : rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1)
1520 );
1519 1521 if (currentJob.endless) {
1520 1522 const index = rewardInfo.JobStage % currentJob.xpAmounts.length;
1521 1523 const excess = Math.floor(rewardInfo.JobStage / (currentJob.xpAmounts.length - 1));
@@ -1528,11 +1530,11 @@ export const addMissionRewards = async (
1528 1530 });
1529 1531 SyndicateXPItemReward = medallionAmount;
1530 1532 logger.debug(
1531 `Giving ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier bounty`
1533 `Giving ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier ${currentJob.isVault ? "vault bounty" : "bounty"}`
1532 1534 );
1533 1535 } else {
1534 1536 logger.warn(
1535 `${currentJob.jobType} tried to give ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier bounty`
1537 `${currentJob.jobType} tried to give ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier ${currentJob.isVault ? "vault bounty" : "bounty"}`
1536 1538 );
1537 1539 logger.warn(`currentJob`, { currentJob: currentJob });
1538 1540 }