XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: handle purchaseQuantity for resources (#609)

68335aa9
Sainan <sainan@calamity.inc>
提交于

代码差异

3 个文件 +15 -6
Modified package-lock.json +4 -4
@@ -12,7 +12,7 @@
12 12 "copyfiles": "^2.4.1",
13 13 "express": "^5",
14 14 "mongoose": "^8.9.2",
15 "warframe-public-export-plus": "^0.5.10",
15 "warframe-public-export-plus": "^0.5.11",
16 16 "warframe-riven-info": "^0.1.2",
17 17 "winston": "^3.17.0",
18 18 "winston-daily-rotate-file": "^5.0.0"
@@ -3877,9 +3877,9 @@
3877 3877 }
3878 3878 },
3879 3879 "node_modules/warframe-public-export-plus": {
3880 "version": "0.5.10",
3881 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.10.tgz",
3882 "integrity": "sha512-6RtWkQDMouMXoUePohkAsYYG/wGW9b/WjSIcrxCb80pWpwrMWr5lr7kzDKPMRkq1Ju8uh9sJirp/5oyeiJbyyQ=="
3880 "version": "0.5.11",
3881 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.11.tgz",
3882 "integrity": "sha512-NJx5l6FsC8rwh9KcWrvu3Owvxtw6DFuk1ZEfsCXl5OGhnyqdd/9U0K9kDY+5T8aIoad7/7ftU1PmbVu4KOKGTA=="
3883 3883 },
3884 3884 "node_modules/warframe-riven-info": {
3885 3885 "version": "0.1.2",
Modified package.json +1 -1
@@ -16,7 +16,7 @@
16 16 "copyfiles": "^2.4.1",
17 17 "express": "^5",
18 18 "mongoose": "^8.9.2",
19 "warframe-public-export-plus": "^0.5.10",
19 "warframe-public-export-plus": "^0.5.11",
20 20 "warframe-riven-info": "^0.1.2",
21 21 "winston": "^3.17.0",
22 22 "winston-daily-rotate-file": "^5.0.0"
Modified src/services/purchaseService.ts +10 -1
@@ -14,7 +14,14 @@ import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
14 14 import { IPurchaseRequest, IPurchaseResponse, SlotPurchase, IInventoryChanges } from "@/src/types/purchaseTypes";
15 15 import { logger } from "@/src/utils/logger";
16 16 import worldState from "@/static/fixed_responses/worldState.json";
17 import { ExportBundles, ExportGear, ExportSyndicates, ExportVendors, TRarity } from "warframe-public-export-plus";
17 import {
18 ExportBundles,
19 ExportGear,
20 ExportResources,
21 ExportSyndicates,
22 ExportVendors,
23 TRarity
24 } from "warframe-public-export-plus";
18 25
19 26 export const getStoreItemCategory = (storeItem: string) => {
20 27 const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
@@ -188,6 +195,8 @@ const handleStoreItemAcquisition = async (
188 195 if (!ignorePurchaseQuantity) {
189 196 if (internalName in ExportGear) {
190 197 quantity *= ExportGear[internalName].purchaseQuantity || 1;
198 } else if (internalName in ExportResources) {
199 quantity *= ExportResources[internalName].purchaseQuantity || 1;
191 200 }
192 201 }
193 202 switch (storeCategory) {