返回提交历史
Modified
src/controllers/api/missionInventoryUpdateController.ts
+10
-2
XFEstudio/XFESpaceNinjaServer
chore: check for xpBasedLevelCapDisabled in missionInventoryUpdate (#2859)
The bootstrapper provides this field since 0.8.2, so I think this field being absent is now more likely to mean that the patch is not in effect. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2859 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
159e151d
代码差异
1 个文件
+10
-2
@@ -129,14 +129,22 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
129
129
res.json(deltas);
130
130
} else if (missionReport.RewardInfo) {
131
131
logger.debug(`classic mission completion, sending everything`);
132
const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
132
const inventoryResponse = await getInventoryResponse(
133
inventory,
134
"xpBasedLevelCapDisabled" in req.query,
135
account.BuildLabel
136
);
133
137
res.json({
134
138
InventoryJson: JSON.stringify(inventoryResponse),
135
139
...deltas
136
140
} satisfies IMissionInventoryUpdateResponse);
137
141
} else {
138
142
logger.debug(`no reward info, assuming this wasn't a mission completion and we should just sync inventory`);
139
const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
143
const inventoryResponse = await getInventoryResponse(
144
inventory,
145
"xpBasedLevelCapDisabled" in req.query,
146
account.BuildLabel
147
);
140
148
res.json({
141
149
InventoryJson: JSON.stringify(inventoryResponse)
142
150
} satisfies IMissionInventoryUpdateResponseBackToDryDock);