返回提交历史
Modified
package-lock.json
+4
-4
Modified
package.json
+1
-1
Modified
src/services/inventoryService.ts
+3
-3
Modified
src/services/missionInventoryUpdateService.ts
+0
-21
Modified
src/services/purchaseService.ts
+3
-3
XFEstudio/XFESpaceNinjaServer
chore: use creditBundles map from PE+ (#1008)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1008
bc079788
代码差异
5 个文件
+11
-32
@@ -12,7 +12,7 @@
12
12
"copyfiles": "^2.4.1",
13
13
"express": "^5",
14
14
"mongoose": "^8.9.4",
15
"warframe-public-export-plus": "^0.5.35",
15
"warframe-public-export-plus": "^0.5.36",
16
16
"warframe-riven-info": "^0.1.2",
17
17
"winston": "^3.17.0",
18
18
"winston-daily-rotate-file": "^5.0.0"
@@ -4093,9 +4093,9 @@
4093
4093
}
4094
4094
},
4095
4095
"node_modules/warframe-public-export-plus": {
4096
"version": "0.5.35",
4097
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.35.tgz",
4098
"integrity": "sha512-YLQP1n5sOV+PS5hfC4Kuoapa9gsqOy5Qy/E4EYfRV/xJBruFl3tPhbdbgFn3HhL2OBrgRJ8yzT5bjIvaHKhOCw=="
4096
"version": "0.5.36",
4097
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.36.tgz",
4098
"integrity": "sha512-FYZECqBSnynl6lQvcQyEqpnGW9l84wzusekhtwKjvg3280CYdn7g5x0Q9tOMhj1jpc/1tuY+akHtHa94sPtqKw=="
4099
4099
},
4100
4100
"node_modules/warframe-riven-info": {
4101
4101
"version": "0.1.2",
@@ -17,7 +17,7 @@
17
17
"copyfiles": "^2.4.1",
18
18
"express": "^5",
19
19
"mongoose": "^8.9.4",
20
"warframe-public-export-plus": "^0.5.35",
20
"warframe-public-export-plus": "^0.5.36",
21
21
"warframe-riven-info": "^0.1.2",
22
22
"winston": "^3.17.0",
23
23
"winston-daily-rotate-file": "^5.0.0"
@@ -44,6 +44,7 @@ import {
44
44
ExportFusionBundles,
45
45
ExportGear,
46
46
ExportKeys,
47
ExportMisc,
47
48
ExportRecipes,
48
49
ExportResources,
49
50
ExportSentinels,
@@ -53,7 +54,6 @@ import {
53
54
TStandingLimitBin
54
55
} from "warframe-public-export-plus";
55
56
import { createShip } from "./shipService";
56
import { creditBundles } from "@/src/services/missionInventoryUpdateService";
57
57
import { IKeyChainRequest } from "@/src/controllers/api/giveKeyChainTriggeredItemsController";
58
58
import { toOid } from "../helpers/inventoryHelpers";
59
59
import { generateRewardSeed } from "@/src/controllers/api/getNewRewardSeedController";
@@ -308,8 +308,8 @@ export const addItem = async (
308
308
};
309
309
}
310
310
}
311
if (typeName in creditBundles) {
312
const creditsTotal = creditBundles[typeName] * quantity;
311
if (typeName in ExportMisc.creditBundles) {
312
const creditsTotal = ExportMisc.creditBundles[typeName] * quantity;
313
313
inventory.RegularCredits += creditsTotal;
314
314
return {
315
315
InventoryChanges: {
@@ -51,27 +51,6 @@ const getRandomRewardByChance = (pool: IReward[]): IRngResult | undefined => {
51
51
return getRandomReward(pool as IRngResult[]);
52
52
};
53
53
54
export const creditBundles: Record<string, number> = {
55
"/Lotus/Types/PickUps/Credits/1500Credits": 1500,
56
"/Lotus/Types/PickUps/Credits/2000Credits": 2000,
57
"/Lotus/Types/PickUps/Credits/2500Credits": 2500,
58
"/Lotus/Types/PickUps/Credits/3000Credits": 3000,
59
"/Lotus/Types/PickUps/Credits/4000Credits": 4000,
60
"/Lotus/Types/PickUps/Credits/5000Credits": 5000,
61
"/Lotus/Types/PickUps/Credits/7500Credits": 7500,
62
"/Lotus/Types/PickUps/Credits/10000Credits": 10000,
63
"/Lotus/Types/PickUps/Credits/5000Hollars": 5000,
64
"/Lotus/Types/PickUps/Credits/7500Hollars": 7500,
65
"/Lotus/Types/PickUps/Credits/10000Hollars": 10000,
66
"/Lotus/Types/PickUps/Credits/CorpusArenaCreditRewards/CorpusArenaRewardOneHard": 105000,
67
"/Lotus/Types/PickUps/Credits/CorpusArenaCreditRewards/CorpusArenaRewardTwoHard": 175000,
68
"/Lotus/Types/PickUps/Credits/CorpusArenaCreditRewards/CorpusArenaRewardThreeHard": 250000,
69
"/Lotus/Types/StoreItems/CreditBundles/Zariman/TableACreditsCommon": 15000,
70
"/Lotus/Types/StoreItems/CreditBundles/Zariman/TableACreditsUncommon": 30000,
71
"/Lotus/Types/StoreItems/CreditBundles/CreditBundleA": 50000,
72
"/Lotus/Types/StoreItems/CreditBundles/CreditBundleC": 175000
73
};
74
75
54
//type TMissionInventoryUpdateKeys = keyof IMissionInventoryUpdateRequest;
76
55
//const ignoredInventoryUpdateKeys = ["FpsAvg", "FpsMax", "FpsMin", "FpsSamples"] satisfies TMissionInventoryUpdateKeys[]; // for keys with no meaning for this server
77
56
//type TignoredInventoryUpdateKeys = (typeof ignoredInventoryUpdateKeys)[number];
@@ -18,6 +18,7 @@ import {
18
18
ExportBoosterPacks,
19
19
ExportBundles,
20
20
ExportGear,
21
ExportMisc,
21
22
ExportResources,
22
23
ExportSyndicates,
23
24
ExportVendors,
@@ -25,7 +26,6 @@ import {
25
26
} from "warframe-public-export-plus";
26
27
import { config } from "./configService";
27
28
import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel";
28
import { creditBundles } from "./missionInventoryUpdateService";
29
29
30
30
export const getStoreItemCategory = (storeItem: string): string => {
31
31
const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
@@ -335,8 +335,8 @@ const handleCreditBundlePurchase = async (
335
335
typeName: string,
336
336
inventory: TInventoryDatabaseDocument
337
337
): Promise<IPurchaseResponse> => {
338
if (typeName && typeName in creditBundles) {
339
const creditsAmount = creditBundles[typeName];
338
if (typeName && typeName in ExportMisc.creditBundles) {
339
const creditsAmount = ExportMisc.creditBundles[typeName];
340
340
341
341
inventory.RegularCredits += creditsAmount;
342
342
await inventory.save();