返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+16
-0
Modified
src/types/commonTypes.ts
+9
-0
Added
static/fixed_responses/junctionRewards.json
+120
-0
XFEstudio/SpaceNinjaServer
fix: junction rewards (#982)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/982 Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com> Co-committed-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
eb56442d
代码差异
3 个文件
+145
-0
@@ -26,6 +26,8 @@ import { getLevelKeyRewards, getNode } from "@/src/services/itemDataService";
26
26
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
27
27
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
28
28
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
29
import junctionRewards from "@/static/fixed_responses/junctionRewards.json";
30
import { IJunctionRewards } from "@/src/types/commonTypes";
29
31
30
32
const getRotations = (rotationCount: number): number[] => {
31
33
if (rotationCount === 0) return [0];
@@ -273,6 +275,20 @@ export const addMissionRewards = async (
273
275
}
274
276
}
275
277
278
if (rewardInfo.node in junctionRewards) {
279
const junctionReward = (junctionRewards as IJunctionRewards)[rewardInfo.node];
280
for (const item of junctionReward.items) {
281
MissionRewards.push({
282
StoreItem: item.ItemType,
283
ItemCount: item.ItemCount
284
});
285
}
286
if (junctionReward.credits) {
287
inventory.RegularCredits += junctionReward.credits;
288
missionCompletionCredits += junctionReward.credits;
289
}
290
}
291
276
292
for (const reward of MissionRewards) {
277
293
//TODO: additem should take in storeItems
278
294
const inventoryChange = await addItem(inventory, reward.StoreItem.replace("StoreItems/", ""), reward.ItemCount);
@@ -1,3 +1,5 @@
1
import { ITypeCount } from "@/src/types/inventoryTypes/inventoryTypes";
2
1
3
export interface IOid {
2
4
$oid: string;
3
5
}
@@ -7,3 +9,10 @@ export interface IMongoDate {
7
9
$numberLong: string;
8
10
};
9
11
}
12
13
export interface IReward {
14
items: ITypeCount[];
15
credits: number;
16
}
17
18
export type IJunctionRewards = Record<string, IReward>;
@@ -0,0 +1,120 @@
1
{
2
"VenusToMercuryJunction": {
3
"items": [
4
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedIntroQuest/InfestedIntroQuestKeyChain", "ItemCount": 1 },
5
{ "ItemType": "/Lotus/StoreItems/Types/Keys/KubrowQuest/KubrowQuestKeyChain", "ItemCount": 1 },
6
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Rifle/BoltoRifle", "ItemCount": 1 },
7
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarShieldRechargeRateMod", "ItemCount": 1 },
8
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarAbilityEfficiencyMod", "ItemCount": 1 },
9
{ "ItemType": "/Lotus/StoreItems/Types/Game/KubrowPet/EggHatcher", "ItemCount": 1 }
10
],
11
"credits": 10000
12
},
13
"EarthToVenusJunction": {
14
"items": [
15
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/FurisBlueprint", "ItemCount": 1 },
16
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Melee/WeaponFreezeDamageMod", "ItemCount": 1 },
17
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Rifle/WeaponElectricityDamageMod", "ItemCount": 1 },
18
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/SentinelRecipes/TnSentinelCrossBlueprint", "ItemCount": 1 },
19
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/StaffCmbOneMeleeTree", "ItemCount": 1 },
20
{ "ItemType": "/Lotus/StoreItems/Types/Items/MiscItems/OrokinReactor", "ItemCount": 1 },
21
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Aura/PlayerEnergyHealthRegenAuraMod", "ItemCount": 1 }
22
],
23
"credits": 5000
24
},
25
"EarthToMarsJunction": {
26
"items": [
27
{ "ItemType": "/Lotus/StoreItems/Types/Keys/ArchwingQuest/ArchwingQuestKeyChain", "ItemCount": 1 },
28
{ "ItemType": "/Lotus/StoreItems/Types/Game/KubrowPet/EggHatcher", "ItemCount": 1 },
29
{ "ItemType": "/Lotus/StoreItems/Types/Items/ShipFeatureItems/VoidProjectionFeatureItem", "ItemCount": 1 },
30
{ "ItemType": "/Lotus/StoreItems/Types/Game/Projections/T1VoidProjectionRevenantPrimeABronze", "ItemCount": 1 },
31
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/Hammer/HammerWeapon", "ItemCount": 1 },
32
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/IronPhoenixMeleeTree", "ItemCount": 1 },
33
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain", "ItemCount": 1 }
34
],
35
"credits": 15000
36
},
37
"MarsToCeresJunction": {
38
"items": [
39
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnSniperRifleBlueprint", "ItemCount": 1 },
40
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Melee/WeaponToxinDamageMod", "ItemCount": 1 },
41
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/DualSwordCmbOneMeleeTree", "ItemCount": 1 }
42
],
43
"credits": 20000
44
},
45
"MarsToPhobosJunction": {
46
"items": [
47
{ "ItemType": "/Lotus/StoreItems/Types/Keys/SpyQuestKeyChain/SpyQuestKeyChain", "ItemCount": 1 },
48
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnHeavyPistolBlueprint", "ItemCount": 1 },
49
{ "ItemType": "/Lotus/StoreItems/Types/StoreItems/Consumables/CipherBlueprint", "ItemCount": 1 },
50
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Rifle/WeaponReloadSpeedMod", "ItemCount": 1 },
51
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarLootRadarMod", "ItemCount": 1 },
52
{ "ItemType": "/Lotus/StoreItems/Types/Items/MiscItems/OrokinCatalyst", "ItemCount": 1 }
53
],
54
"credits": 20000
55
},
56
"JupiterToEuropaJunction": {
57
"items": [
58
{ "ItemType": "/Lotus/StoreItems/Types/Keys/LimboQuest/LimboQuestKeyChain", "ItemCount": 1 },
59
{ "ItemType": "/Lotus/StoreItems/Types/Keys/DragonQuest/DragonQuestKeyChain", "ItemCount": 1 },
60
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/CorpusMinigunBlueprint", "ItemCount": 1 },
61
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Aura/PlayerHealthAuraMod", "ItemCount": 1 }
62
],
63
"credits": 40000
64
},
65
"JupiterToSaturnJunction": {
66
"items": [
67
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrenadeLauncherBlueprint", "ItemCount": 1 },
68
{ "ItemType": "/Lotus/StoreItems/Types/Keys/ProteaQuest/ProteaQuestKeyChain", "ItemCount": 1 }
69
],
70
"credits": 40000
71
},
72
"SaturnToUranusJunction": {
73
"items": [
74
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/CorpusWhipBlueprint", "ItemCount": 1 },
75
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaHelmetBlueprint", "ItemCount": 1 },
76
{ "ItemType": "/Lotus/StoreItems/Types/Keys/DuviriQuest/DuviriQuestKeyChain", "ItemCount": 1 },
77
{ "ItemType": "/Lotus/StoreItems/Types/NeutralCreatures/ErsatzHorse/ErsatzHorsePowerSuit", "ItemCount": 1 }
78
],
79
"credits": 60000
80
},
81
"UranusToNeptuneJunction": {
82
"items": [
83
{ "ItemType": "/Lotus/StoreItems/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain", "ItemCount": 1 },
84
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/ReconnasorBlueprint", "ItemCount": 1 },
85
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaChassisBlueprint", "ItemCount": 1 }
86
],
87
"credits": 80000
88
},
89
"NeptuneToPlutoJunction": {
90
"items": [
91
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrineerFlakCannonBlueprint", "ItemCount": 1 },
92
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaSystemsBlueprint", "ItemCount": 1 }
93
],
94
"credits": 80000
95
},
96
"PlutoToSednaJunction": {
97
"items": [
98
{ "ItemType": "/Lotus/StoreItems/Types/Keys/WarWithinQuest/WarWithinQuestKeyChain", "ItemCount": 1 },
99
{ "ItemType": "/Lotus/StoreItems/Types/Keys/MirageQuest/MirageQuestKeyChain", "ItemCount": 1 },
100
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/DualDaggerBlueprint", "ItemCount": 1 }
101
],
102
"credits": 100000
103
},
104
"PlutoToErisJunction": {
105
"items": [
106
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedAladVQuest/InfestedAladVQuestKeyChain", "ItemCount": 1 },
107
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/MireSwordBlueprint", "ItemCount": 1 }
108
],
109
"credits": 100000
110
},
111
"CeresToJupiterJunction": {
112
"items": [
113
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnStaffBlueprint", "ItemCount": 1 },
114
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Suit/ArchwingSuitHealthMaxMod", "ItemCount": 1 },
115
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Rifle/ArchwingRifleDamageAmountMod", "ItemCount": 1 },
116
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Melee/ArchwingMeleeDamageMod", "ItemCount": 1 }
117
],
118
"credits": 30000
119
}
120
}