返回提交历史
Modified
src/services/inventoryService.ts
+1
-1
Modified
src/services/missionInventoryUpdateService.ts
+3
-3
XFEstudio/SpaceNinjaServer
fix: junction completion on steel path doesn't save (#2937)
Aka., an alternative approach to fixing the problem in #2866. Junctions don't have RewardInfo and therefore weren't reaching the new call to addMissionComplete. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2937 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
23abe5de
代码差异
2 个文件
+4
-4
@@ -2180,7 +2180,7 @@ export const addMissionComplete = (inventory: TInventoryDatabaseDocument, { Tag,
2180
2180
2181
2181
if (itemIndex !== -1) {
2182
2182
Missions[itemIndex].Completes += Completes;
2183
if (Tier) {
2183
if (Completes && Tier) {
2184
2184
Missions[itemIndex].Tier = Tier;
2185
2185
}
2186
2186
} else {
@@ -310,6 +310,9 @@ export const addMissionInventoryUpdates = async (
310
310
}
311
311
break;
312
312
}
313
case "Missions":
314
addMissionComplete(inventory, value);
315
break;
313
316
case "LastRegionPlayed":
314
317
if (!(config.unfaithfulBugFixes?.ignore1999LastRegionPlayed && value === "1999MapName")) {
315
318
inventory.LastRegionPlayed = value;
@@ -1242,9 +1245,6 @@ export const addMissionRewards = async (
1242
1245
if (missions && missions.Tag in ExportRegions) {
1243
1246
const node = ExportRegions[missions.Tag];
1244
1247
1245
// cannot add this with normal updates because { Tier: 1 } would mark the SP node as completed even on a failure
1246
addMissionComplete(inventory, missions);
1247
1248
1248
//node based credit rewards for mission completion
1249
1249
if (isEligibleForCreditReward(rewardInfo, missions, node)) {
1250
1250
const levelCreditReward = getLevelCreditRewards(node);