返回提交历史
Modified
src/services/inventoryService.ts
+4
-4
XFEstudio/XFESpaceNinjaServer
fix: subtract standing gained in missions from daily bin (#880)
Fixes #794 Reviewed-on: http://209.141.38.3/OpenWF/SpaceNinjaServer/pulls/880 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
53ce6ccc
代码差异
1 个文件
+4
-4
@@ -41,6 +41,7 @@ import {
41
41
ExportRecipes,
42
42
ExportResources,
43
43
ExportSentinels,
44
ExportSyndicates,
44
45
ExportUpgrades,
45
46
ExportWeapons,
46
47
TStandingLimitBin
@@ -1054,12 +1055,11 @@ export const addBooster = (ItemType: string, time: number, inventory: TInventory
1054
1055
export const updateSyndicate = (
1055
1056
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
1056
1057
syndicateUpdate: IMissionInventoryUpdateRequest["AffiliationChanges"]
1057
) => {
1058
): void => {
1058
1059
syndicateUpdate?.forEach(affiliation => {
1059
1060
const syndicate = inventory.Affiliations.find(x => x.Tag == affiliation.Tag);
1060
1061
if (syndicate !== undefined) {
1061
syndicate.Standing =
1062
syndicate.Standing === undefined ? affiliation.Standing : syndicate.Standing + affiliation.Standing;
1062
syndicate.Standing += affiliation.Standing;
1063
1063
syndicate.Title = syndicate.Title === undefined ? affiliation.Title : syndicate.Title + affiliation.Title;
1064
1064
} else {
1065
1065
inventory.Affiliations.push({
@@ -1070,8 +1070,8 @@ export const updateSyndicate = (
1070
1070
FreeFavorsUsed: []
1071
1071
});
1072
1072
}
1073
updateStandingLimit(inventory, ExportSyndicates[affiliation.Tag].dailyLimitBin, affiliation.Standing);
1073
1074
});
1074
return { AffiliationMods: [] };
1075
1075
};
1076
1076
1077
1077
/**