返回提交历史
Modified
src/controllers/api/fishmongerController.ts
+4
-2
Modified
src/controllers/api/syndicateStandingBonusController.ts
+1
-1
XFEstudio/XFESpaceNinjaServer
fix: provide correct gained standing amount to old versions (#3262)
It may be clipped due to daily or title caps. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3262 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
df69be56
代码差异
2 个文件
+5
-3
@@ -4,6 +4,7 @@ import { getAccountIdForRequest } from "../../services/loginService.ts";
4
4
import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts";
5
5
import type { RequestHandler } from "express";
6
6
import { ExportResources } from "warframe-public-export-plus";
7
import type { IAffiliationMods } from "../../types/purchaseTypes.ts";
7
8
8
9
export const fishmongerController: RequestHandler = async (req, res) => {
9
10
const accountId = await getAccountIdForRequest(req);
@@ -30,14 +31,15 @@ export const fishmongerController: RequestHandler = async (req, res) => {
30
31
miscItemChanges.push({ ItemType: fish.ItemType, ItemCount: fish.ItemCount * -1 });
31
32
}
32
33
addMiscItems(inventory, miscItemChanges);
33
if (gainedStanding && syndicateTag) addStanding(inventory, syndicateTag, gainedStanding);
34
const affiliationMods: IAffiliationMods[] = [];
35
if (gainedStanding && syndicateTag) addStanding(inventory, syndicateTag, gainedStanding, affiliationMods);
34
36
await inventory.save();
35
37
res.json({
36
38
InventoryChanges: {
37
39
MiscItems: miscItemChanges
38
40
},
39
41
SyndicateTag: syndicateTag,
40
StandingChange: gainedStanding
42
StandingChange: affiliationMods[0].Standing
41
43
});
42
44
};
43
45
@@ -68,7 +68,7 @@ export const syndicateStandingBonusController: RequestHandler = async (req, res)
68
68
69
69
res.json({
70
70
AffiliationTag: affiliationTag, // Older versions
71
StandingChange: gainedStanding, // Older versions
71
StandingChange: affiliationMods[0].Standing, // Older versions
72
72
InventoryChanges: inventoryChanges, // Newer versions
73
73
AffiliationMods: affiliationMods // Newer versions
74
74
});