返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+17
-17
XFEstudio/XFESpaceNinjaServer
fix: only give void relic rewards once (#3522)
Moving this code down past where MissionRewards gets added to the inventory because we want the MissionRewards for void relics to be visual only. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3522 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
38835bb7
代码差异
1 个文件
+17
-17
@@ -1486,23 +1486,6 @@ export const addMissionRewards = async (
1486
1486
ConquestCompletedMissionsCount = rewardInfo.ConquestCompleted == 2 ? 0 : rewardInfo.ConquestCompleted + 1;
1487
1487
}
1488
1488
1489
if (voidTearWave && voidTearWave.Participants[0].QualifiesForReward) {
1490
if (!voidTearWave.Participants[0].HaveRewardResponse) {
1491
// non-endless fissure; giving reward now
1492
const reward = await crackRelic(inventory, voidTearWave.Participants[0], inventoryChanges);
1493
MissionRewards.push({ StoreItem: reward.type, ItemCount: reward.itemCount });
1494
} else if (inventory.MissionRelicRewards) {
1495
// endless fissure; already gave reward(s) but should still show in EOM screen
1496
for (const reward of inventory.MissionRelicRewards) {
1497
MissionRewards.push({
1498
StoreItem: reward.ItemType,
1499
ItemCount: reward.ItemCount
1500
});
1501
}
1502
inventory.MissionRelicRewards = undefined;
1503
}
1504
}
1505
1506
1489
let nodeControlledByNemesis = false;
1507
1490
if (inventory.Nemesis) {
1508
1491
nodeControlledByNemesis = inventory.Nemesis.InfNodes.some(obj => obj.Node == rewardInfo.node);
@@ -1690,6 +1673,23 @@ export const addMissionRewards = async (
1690
1673
}
1691
1674
}
1692
1675
1676
if (voidTearWave && voidTearWave.Participants[0].QualifiesForReward) {
1677
if (!voidTearWave.Participants[0].HaveRewardResponse) {
1678
// non-endless fissure; giving reward now
1679
const reward = await crackRelic(inventory, voidTearWave.Participants[0], inventoryChanges);
1680
MissionRewards.push({ StoreItem: reward.type, ItemCount: reward.itemCount });
1681
} else if (inventory.MissionRelicRewards) {
1682
// endless fissure; already gave reward(s) but should still show in EOM screen
1683
for (const reward of inventory.MissionRelicRewards) {
1684
MissionRewards.push({
1685
StoreItem: reward.ItemType,
1686
ItemCount: reward.ItemCount
1687
});
1688
}
1689
inventory.MissionRelicRewards = undefined;
1690
}
1691
}
1692
1693
1693
if (strippedItems) {
1694
1694
if (endOfMatchUpload) {
1695
1695
for (const si of strippedItems) {