返回提交历史
Modified
src/app.ts
+20
-0
Modified
src/controllers/api/getGuildController.ts
+1
-64
Modified
src/controllers/api/inventoryController.ts
+7
-70
Modified
src/controllers/api/loginController.ts
+7
-26
Modified
src/controllers/api/tauntHistoryController.ts
+16
-10
Added
src/controllers/api/updateInventoryController.ts
+151
-0
Modified
src/helpers/customHelpers/customHelpers.ts
+0
-5
Modified
src/helpers/loginHelpers.ts
+2
-14
Modified
src/models/inventoryModels/inventoryModel.ts
+3
-230
Modified
src/models/loginModel.ts
+1
-9
Modified
src/routes/api.ts
+13
-0
Modified
src/routes/cache.ts
+5
-0
Modified
src/types/inventoryTypes/inventoryTypes.ts
+1
-2
Modified
src/types/loginTypes.ts
+7
-25
Modified
static/fixed_responses/postTutorialInventory.json
+8
-124
XFEstudio/XFESpaceNinjaServer
init
58b1cfc3
代码差异
15 个文件
+242
-579
@@ -15,12 +15,32 @@ import { statsRouter } from "@/src/routes/stats";
15
15
import { webuiRouter } from "@/src/routes/webui";
16
16
import { connectDatabase } from "@/src/services/mongoService";
17
17
import { registerLogFileCreationListener } from "@/src/utils/logger";
18
import * as zlib from 'zlib';
18
19
19
20
void registerLogFileCreationListener();
20
21
void connectDatabase();
21
22
22
23
const app = express();
23
24
25
app.use(function (req, _res, next) {
26
var buffer: Buffer[] = []
27
req.on('data', function (chunk: Buffer) {
28
if (chunk !== undefined && chunk.length > 2 && chunk[0] == 0x1f && chunk[1] == 0x8b) {
29
buffer.push(Buffer.from(chunk));
30
}
31
});
32
33
req.on('end', function () {
34
zlib.gunzip(Buffer.concat(buffer), function (_err, dezipped) {
35
if (typeof dezipped != 'undefined') {
36
req.body = dezipped.toString('utf-8');
37
}
38
39
next();
40
});
41
});
42
});
43
24
44
app.use(bodyParser.raw());
25
45
app.use(express.json());
26
46
app.use(bodyParser.text());
@@ -4,70 +4,7 @@ import { Guild } from "@/src/models/guildModel";
4
4
import { getAccountIdForRequest } from "@/src/services/loginService";
5
5
import { toOid } from "@/src/helpers/inventoryHelpers";
6
6
7
// eslint-disable-next-line @typescript-eslint/no-misused-promises
8
const getGuildController: RequestHandler = async (req, res) => {
9
const accountId = await getAccountIdForRequest(req);
10
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
11
if (!inventory) {
12
res.status(400).json({ error: "inventory was undefined" });
13
return;
14
}
15
if (inventory.GuildId) {
16
const guild = await Guild.findOne({ _id: inventory.GuildId });
17
if (guild) {
18
res.json({
19
_id: toOid(guild._id),
20
Name: guild.Name,
21
Members: [
22
{
23
_id: { $oid: req.query.accountId },
24
Rank: 0,
25
Status: 0
26
}
27
],
28
Ranks: [
29
{
30
Name: "/Lotus/Language/Game/Rank_Creator",
31
Permissions: 16351
32
},
33
{
34
Name: "/Lotus/Language/Game/Rank_Warlord",
35
Permissions: 14303
36
},
37
{
38
Name: "/Lotus/Language/Game/Rank_General",
39
Permissions: 4318
40
},
41
{
42
Name: "/Lotus/Language/Game/Rank_Officer",
43
Permissions: 4314
44
},
45
{
46
Name: "/Lotus/Language/Game/Rank_Leader",
47
Permissions: 4106
48
},
49
{
50
Name: "/Lotus/Language/Game/Rank_Sage",
51
Permissions: 4304
52
},
53
{
54
Name: "/Lotus/Language/Game/Rank_Soldier",
55
Permissions: 4098
56
},
57
{
58
Name: "/Lotus/Language/Game/Rank_Initiate",
59
Permissions: 4096
60
},
61
{
62
Name: "/Lotus/Language/Game/Rank_Utility",
63
Permissions: 4096
64
}
65
],
66
Tier: 1
67
});
68
return;
69
}
70
}
7
const getGuildController: RequestHandler = async (_, res) => {
71
8
res.json({});
72
9
};
73
10
@@ -9,6 +9,7 @@ import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
9
9
import { IInventoryDatabase, IShipInventory, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes";
10
10
import { IPolarity, ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
11
11
import { ExportCustoms, ExportFlavour, ExportKeys, ExportResources } from "warframe-public-export-plus";
12
import { IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
12
13
13
14
// eslint-disable-next-line @typescript-eslint/no-misused-promises
14
15
const inventoryController: RequestHandler = async (request, response) => {
@@ -20,9 +21,7 @@ const inventoryController: RequestHandler = async (request, response) => {
20
21
return;
21
22
}
22
23
23
const inventory = await Inventory.findOne({ accountOwnerId: accountId })
24
.populate<{ LoadOutPresets: ILoadoutDatabase }>("LoadOutPresets")
25
.populate<{ Ships: IShipInventory }>("Ships", "-ShipInteriorColors");
24
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
26
25
27
26
if (!inventory) {
28
27
response.status(400).json({ error: "inventory was undefined" });
@@ -38,62 +37,17 @@ const inventoryController: RequestHandler = async (request, response) => {
38
37
if (config.infiniteResources) {
39
38
inventoryResponse.RegularCredits = 999999999;
40
39
inventoryResponse.TradesRemaining = 999999999;
41
inventoryResponse.PremiumCreditsFree = 999999999;
42
40
inventoryResponse.PremiumCredits = 999999999;
43
41
}
44
42
45
if (config.skipAllDialogue) {
46
inventoryResponse.TauntHistory = [
47
{
48
node: "TreasureTutorial",
49
state: "TS_COMPLETED"
50
}
51
];
52
for (const str of allDialogue) {
53
addString(inventoryResponse.NodeIntrosCompleted, str);
54
}
55
}
56
57
43
if (config.unlockAllMissions) {
58
inventoryResponse.Missions = allMissions;
59
addString(inventoryResponse.NodeIntrosCompleted, "TeshinHardModeUnlocked");
44
//inventoryResponse.Missions = allMissions;
45
//inventoryResponse.NodeIntrosCompleted.push("TeshinHardModeUnlocked");
60
46
}
61
47
62
if (config.unlockAllQuests) {
63
for (const [k, v] of Object.entries(ExportKeys)) {
64
if ("chainStages" in v) {
65
if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == k)) {
66
inventoryResponse.QuestKeys.push({ ItemType: k });
67
}
68
}
69
}
70
}
71
if (config.completeAllQuests) {
72
for (const quest of inventoryResponse.QuestKeys) {
73
quest.Completed = true;
74
quest.Progress = [
75
{
76
c: 0,
77
i: false,
78
m: false,
79
b: []
80
}
81
];
82
}
83
84
inventoryResponse.ArchwingEnabled = true;
85
86
// Skip "Watch The Maker"
87
addString(inventoryResponse.NodeIntrosCompleted, "/Lotus/Levels/Cinematics/NewWarIntro/NewWarStageTwo.level");
88
}
89
90
if (config.unlockAllShipDecorations) {
91
inventoryResponse.ShipDecorations = [];
92
for (const [uniqueName, item] of Object.entries(ExportResources)) {
93
if (item.productCategory == "ShipDecorations") {
94
inventoryResponse.ShipDecorations.push({ ItemType: uniqueName, ItemCount: 1 });
95
}
96
}
48
if (config.unlockAllMissions) {
49
//inventoryResponse.Missions = allMissions;
50
//addString(inventoryResponse.NodeIntrosCompleted, "TeshinHardModeUnlocked");
97
51
}
98
52
99
53
if (config.unlockAllFlavourItems) {
@@ -130,23 +84,6 @@ const inventoryController: RequestHandler = async (request, response) => {
130
84
}
131
85
}
132
86
133
if (config.universalPolarityEverywhere) {
134
const Polarity: IPolarity[] = [];
135
for (let i = 0; i != 10; ++i) {
136
Polarity.push({
137
Slot: i,
138
Value: ArtifactPolarity.Any
139
});
140
}
141
for (const key of equipmentKeys) {
142
if (key in inventoryResponse) {
143
for (const equipment of inventoryResponse[key]) {
144
equipment.Polarity = Polarity;
145
}
146
}
147
}
148
}
149
150
87
// Fix for #380
151
88
inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } };
152
89
@@ -8,7 +8,6 @@ import { toLoginRequest } from "@/src/helpers/loginHelpers";
8
8
import { Account } from "@/src/models/loginModel";
9
9
import { createAccount, isCorrectPassword } from "@/src/services/loginService";
10
10
import { ILoginResponse } from "@/src/types/loginTypes";
11
import { DTLS, groups, HUB, platformCDNs } from "@/static/fixed_responses/login_static";
12
11
import { logger } from "@/src/utils/logger";
13
12
14
13
// eslint-disable-next-line @typescript-eslint/no-misused-promises
@@ -17,7 +16,7 @@ const loginController: RequestHandler = async (request, response) => {
17
16
const body = JSON.parse(request.body); // parse octet stream of json data to json object
18
17
const loginRequest = toLoginRequest(body);
19
18
20
const account = await Account.findOne({ email: loginRequest.email }); //{ _id: 0, __v: 0 }
19
const account = await Account.findOne({ email: loginRequest.email });
21
20
const nonce = Math.round(Math.random() * Number.MAX_SAFE_INTEGER);
22
21
23
22
if (!account && config.autoCreateAccount && loginRequest.ClientType != "webui") {
@@ -26,27 +25,16 @@ const loginController: RequestHandler = async (request, response) => {
26
25
email: loginRequest.email,
27
26
password: loginRequest.password,
28
27
DisplayName: loginRequest.email.substring(0, loginRequest.email.indexOf("@")),
29
CountryCode: loginRequest.lang.toUpperCase(),
30
ClientType: loginRequest.ClientType,
31
CrossPlatformAllowed: true,
32
ForceLogoutVersion: 0,
33
ConsentNeeded: false,
34
TrackedSettings: [],
35
Nonce: nonce
28
Nonce: nonce,
36
29
});
37
30
logger.debug("created new account");
38
31
// eslint-disable-next-line @typescript-eslint/no-unused-vars
39
32
const { email, password, ...databaseAccount } = newAccount;
40
33
const newLoginResponse: ILoginResponse = {
41
34
...databaseAccount,
42
Groups: groups,
43
platformCDNs: platformCDNs,
44
NRS: [config.myAddress],
45
DTLS: DTLS,
46
IRC: config.myIrcAddresses ?? [config.myAddress],
47
HUB: HUB,
48
35
BuildLabel: buildConfig.buildLabel,
49
MatchmakingBuildId: buildConfig.matchmakingBuildId
36
NatHash: "0",
37
SteamId: "0"
50
38
};
51
39
52
40
response.json(newLoginResponse);
@@ -67,22 +55,15 @@ const loginController: RequestHandler = async (request, response) => {
67
55
if (account.Nonce == 0 || loginRequest.ClientType != "webui") {
68
56
account.Nonce = nonce;
69
57
}
70
if (loginRequest.ClientType != "webui") {
71
account.CountryCode = loginRequest.lang.toUpperCase();
72
}
58
73
59
await account.save();
74
60
75
61
const { email, password, ...databaseAccount } = account.toJSON();
76
62
const newLoginResponse: ILoginResponse = {
77
63
...databaseAccount,
78
Groups: groups,
79
platformCDNs: platformCDNs,
80
NRS: [config.myAddress],
81
DTLS: DTLS,
82
IRC: config.myIrcAddresses ?? [config.myAddress],
83
HUB: HUB,
84
64
BuildLabel: buildConfig.buildLabel,
85
MatchmakingBuildId: buildConfig.matchmakingBuildId
65
NatHash: "0",
66
SteamId: "0"
86
67
};
87
68
88
69
response.json(newLoginResponse);
@@ -8,15 +8,21 @@ import { logger } from "@/src/utils/logger";
8
8
export const tauntHistoryController: RequestHandler = async (req, res) => {
9
9
const accountId = await getAccountIdForRequest(req);
10
10
const inventory = await getInventory(accountId);
11
const clientTaunt = JSON.parse(String(req.body)) as ITaunt;
12
logger.debug(`updating taunt ${clientTaunt.node} to state ${clientTaunt.state}`);
13
inventory.TauntHistory ??= [];
14
const taunt = inventory.TauntHistory.find(x => x.node == clientTaunt.node);
15
if (taunt) {
16
taunt.state = clientTaunt.state;
17
} else {
18
inventory.TauntHistory.push(clientTaunt);
11
if(req.body !== undefined)
12
{
13
const clientTaunt = JSON.parse(String(req.body)) as ITaunt;
14
logger.debug(`updating taunt ${clientTaunt.node} to state ${clientTaunt.state}`);
15
inventory.TauntHistory ??= [];
16
const taunt = inventory.TauntHistory.find(x => x.node == clientTaunt.node);
17
if (taunt) {
18
taunt.state = clientTaunt.state;
19
} else {
20
inventory.TauntHistory.push(clientTaunt);
21
}
22
await inventory.save();
23
res.end();
24
}else
25
{
26
res.json({});
19
27
}
20
await inventory.save();
21
res.end();
22
28
};
@@ -0,0 +1,151 @@
1
import { getAccountIdForRequest } from "@/src/services/loginService";
2
import { getJSONfromString } from "@/src/helpers/stringHelpers";
3
import { startRecipe } from "@/src/services/recipeService";
4
import { logger } from "@/src/utils/logger";
5
import { RequestHandler } from "express";
6
import { getInventory } from "@/src/services/inventoryService";
7
8
9
// eslint-disable-next-line @typescript-eslint/no-misused-promises
10
export const updateInventoryController: RequestHandler = async (req, res) => {
11
const accountId = await getAccountIdForRequest(req);
12
const body = JSON.parse(req.body);
13
14
const inventory = await getInventory(accountId);
15
inventory.Missions.push({Tag: body.Missions.Tag, Completes: body.Missions.Completes, BestRating: 0.2 })
16
17
await inventory.save();
18
console.log(body);
19
res.json({})
20
};
21
22
23
/*
24
{
25
"LongGuns" : [
26
{
27
"ItemType" : "",
28
"ItemId" : {
29
"$id" : ""
30
},
31
"XP" : 882,
32
"UpgradeVer" : 0,
33
"UnlockLevel" : 0,
34
"ExtraCapacity" : 4,
35
"ExtraRemaining" : 4
36
}
37
],
38
"Pistols" : [
39
{
40
"ItemType" : "",
41
"ItemId" : {
42
"$id" : ""
43
},
44
"XP" : 0,
45
"UpgradeVer" : 0,
46
"UnlockLevel" : 0,
47
"ExtraCapacity" : 4,
48
"ExtraRemaining" : 4
49
}
50
],
51
"Suits" : [
52
{
53
"ItemType" : "",
54
"ItemId" : {
55
"$id" : ""
56
},
57
"XP" : 982,
58
"UpgradeVer" : 101,
59
"UnlockLevel" : 0,
60
"ExtraCapacity" : 4,
61
"ExtraRemaining" : 4
62
}
63
],
64
"Melee" : [
65
{
66
"ItemType" : "",
67
"ItemId" : {
68
"$id" : ""
69
},
70
"XP" : 0,
71
"UpgradeVer" : 0,
72
"UnlockLevel" : 0,
73
"ExtraCapacity" : 4,
74
"ExtraRemaining" : 4
75
}
76
],
77
"WeaponSkins" : [],
78
"Upgrades" : [],
79
"Boosters" : [],
80
"Robotics" : [],
81
"Consumables" : [],
82
"FlavourItems" : [],
83
"MiscItems" : [],
84
"Cards" : [],
85
"Recipes" : [],
86
"XPInfo" : [],
87
"Sentinels" : [],
88
"SentinelWeapons" : [],
89
"SuitBin" : {
90
"Slots" : 0,
91
"Extra" : 0
92
},
93
"WeaponBin" : {
94
"Slots" : 0,
95
"Extra" : 0
96
},
97
"MiscBin" : {
98
"Slots" : 0,
99
"Extra" : 0
100
},
101
"SentinelBin" : {
102
"Slots" : 0,
103
"Extra" : 0
104
},
105
"RegularCredits" : 1304,
106
"PremiumCredits" : 0,
107
"PlayerXP" : 784,
108
"AdditionalPlayerXP" : 0,
109
"Rating" : 15,
110
"PlayerLevel" : 0,
111
"TrainingDate" : {
112
"sec" : "",
113
"usec" : ""
114
},
115
"AliveTime" : 193.78572,
116
"Missions" : {
117
"Tag" : "SolNode103",
118
"Completes" : 1,
119
"BestRating" : 0.2
120
},
121
"AssignedMissions" : [],
122
"CompletedAlerts" : [],
123
"DeathMarks" : [],
124
"MissionReport" : {
125
"HostId" : "",
126
"MishStartTime" : "1725359860",
127
"MishName" : "SolNode103",
128
"PlayerReport" : {
129
"ReporterId" : "",
130
"FullReport" : true,
131
"PlayerMishInfos" : [
132
{
133
"Pid" : "",
134
"Creds" : 304,
135
"CredBonus" : 1000,
136
"Xp" : 784,
137
"XpBonus" : 0,
138
"SuitXpBonus" : 590,
139
"PistolXpBonus" : 0,
140
"RfileXpBonus" : 490,
141
"MeleeXpBonus" : 0,
142
"SentnlXPBonus" : 0,
143
"SentnlWepXpBonus" : 0,
144
"Rating" : 0.2,
145
"Upgrades" : []
146
}
147
]
148
}
149
}
150
}
151
*/
@@ -43,11 +43,6 @@ const toAccountCreation = (accountCreation: unknown): IAccountCreation => {
43
43
const toDatabaseAccount = (createAccount: IAccountCreation): IDatabaseAccount => {
44
44
return {
45
45
...createAccount,
46
ClientType: "",
47
ConsentNeeded: false,
48
CrossPlatformAllowed: true,
49
ForceLogoutVersion: 0,
50
TrackedSettings: [],
51
46
Nonce: 0
52
47
} satisfies IDatabaseAccount;
53
48
};
@@ -9,23 +9,11 @@ const toLoginRequest = (loginRequest: unknown): ILoginRequest => {
9
9
// TODO: function that checks whether every field of interface is in object
10
10
if (
11
11
"email" in loginRequest &&
12
"password" in loginRequest &&
13
"time" in loginRequest &&
14
"s" in loginRequest &&
15
"lang" in loginRequest &&
16
"date" in loginRequest &&
17
"ClientType" in loginRequest &&
18
"PS" in loginRequest
12
"password" in loginRequest
19
13
) {
20
14
return {
21
15
email: parseEmail(loginRequest.email),
22
password: parseString(loginRequest.password),
23
time: parseNumber(loginRequest.time),
24
s: parseString(loginRequest.s),
25
lang: parseString(loginRequest.lang),
26
date: parseNumber(loginRequest.date),
27
ClientType: parseString(loginRequest.ClientType),
28
PS: parseString(loginRequest.PS)
16
password: parseString(loginRequest.password)
29
17
};
30
18
}
31
19
@@ -589,61 +589,13 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
589
589
RegularCredits: Number,
590
590
//Platinum
591
591
PremiumCredits: Number,
592
//Gift Platinum(Non trade)
593
PremiumCreditsFree: Number,
594
//Endo
595
FusionPoints: Number,
596
592
597
593
//Slots
598
594
SuitBin: slotsBinSchema,
599
595
WeaponBin: slotsBinSchema,
600
596
SentinelBin: slotsBinSchema,
601
SpaceSuitBin: slotsBinSchema,
602
SpaceWeaponBin: slotsBinSchema,
603
PvpBonusLoadoutBin: slotsBinSchema,
604
PveBonusLoadoutBin: slotsBinSchema,
605
597
RandomModBin: slotsBinSchema,
606
OperatorAmpBin: slotsBinSchema,
607
CrewShipSalvageBin: slotsBinSchema,
608
598
MechBin: slotsBinSchema,
609
CrewMemberBin: slotsBinSchema,
610
611
//How many trades do you have left
612
TradesRemaining: Number,
613
//How many Gift do you have left*(gift spends the trade)
614
GiftsRemaining: Number,
615
//Curent trade info Giving or Getting items
616
PendingTrades: [Schema.Types.Mixed],
617
618
//Syndicate currently being pledged to.
619
SupportedSyndicate: String,
620
//Curent Syndicates rank\exp
621
Affiliations: [affiliationsSchema],
622
//Syndicates Missions complate(Navigation->Syndicate)
623
CompletedSyndicates: [String],
624
//Daily Syndicates Exp
625
DailyAffiliation: Number,
626
DailyAffiliationPvp: Number,
627
DailyAffiliationLibrary: Number,
628
DailyAffiliationCetus: Number,
629
DailyAffiliationQuills: Number,
630
DailyAffiliationSolaris: Number,
631
DailyAffiliationVentkids: Number,
632
DailyAffiliationVox: Number,
633
DailyAffiliationEntrati: Number,
634
DailyAffiliationNecraloid: Number,
635
DailyAffiliationZariman: Number,
636
DailyAffiliationKahl: Number,
637
DailyAffiliationCavia: Number,
638
639
//Daily Focus limit
640
DailyFocus: Number,
641
//Focus XP per School
642
FocusXP: focusXPSchema,
643
//Curent active like Active school focuses is = "Zenurik"
644
FocusAbility: String,
645
//The treeways of the Focus school.(Active and passive Ability)
646
FocusUpgrades: [focusUpgradesSchema],
647
599
648
600
//Achievement
649
601
ChallengeProgress: [challengeProgressSchema],
@@ -651,8 +603,6 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
651
603
//Account Item like Ferrite,Form,Kuva etc
652
604
MiscItems: [typeCountSchema],
653
605
654
//Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
655
RawUpgrades: [RawUpgrades],
656
606
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
657
607
Upgrades: [upgradesSchema],
658
608
@@ -672,95 +622,26 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
672
622
//Sentinel(like Helios or modular)
673
623
Sentinels: [EquipmentSchema],
674
624
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
675
SentinelWeapons: [EquipmentSchema],
676
//Modular Pets
677
MoaPets: [EquipmentSchema],
678
679
KubrowPetEggs: [Schema.Types.Mixed],
680
//Like PowerSuit Cat\Kubrow or etc Pets
681
KubrowPets: [EquipmentSchema],
682
//Prints Cat(3 Prints)\Kubrow(2 Prints) Pets
683
KubrowPetPrints: [Schema.Types.Mixed],
625
SentinelWeapons: [Schema.Types.Mixed],
684
626
685
627
//Item for EquippedGear example:Scaner,LoadoutTechSummon etc
686
628
Consumables: [typeCountSchema],
687
629
//Weel Emotes+Gear
688
EquippedEmotes: [String],
689
EquippedGear: [String],
690
630
//Equipped Shawzin
691
EquippedInstrument: String,
692
631
ReceivedStartingGear: Boolean,
693
632
694
//to use add SummonItem to Consumables+EquippedGear
695
//Archwing need Suits+Melee+Guns
696
SpaceSuits: [EquipmentSchema],
697
SpaceMelee: [EquipmentSchema],
698
SpaceGuns: [EquipmentSchema],
699
ArchwingEnabled: Boolean,
700
//Mech need Suits+SpaceGuns+SpecialItem
701
MechSuits: [EquipmentSchema],
702
///Restoratives/HoverboardSummon (like Suit)
703
Hoverboards: [EquipmentSchema],
704
705
//Use Operator\Drifter
706
UseAdultOperatorLoadout: Boolean,
707
//Operator\Drifter Weapon
708
OperatorAmps: [EquipmentSchema],
709
//Operator
710
OperatorLoadOuts: [operatorConfigSchema],
711
//Drifter
712
AdultOperatorLoadOuts: [operatorConfigSchema],
713
DrifterMelee: [EquipmentSchema],
714
DrifterGuns: [EquipmentSchema],
715
//ErsatzHorsePowerSuit
716
Horses: [EquipmentSchema],
717
718
//LandingCraft like Liset
719
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
720
// /Lotus/Types/Items/ShipDecos/
721
ShipDecorations: [typeCountSchema],
722
723
//RailJack Setting(Mods,Skin,Weapon,etc)
724
CrewShipHarnesses: [EquipmentSchema],
725
//Railjack/Components(https://warframe.fandom.com/wiki/Railjack/Components)
726
CrewShipRawSalvage: [Schema.Types.Mixed],
727
728
//Default RailJack
729
CrewShips: [Schema.Types.Mixed],
730
CrewShipAmmo: [typeCountSchema],
731
CrewShipWeapons: [Schema.Types.Mixed],
732
CrewShipWeaponSkins: [Schema.Types.Mixed],
733
734
//NPC Crew and weapon
735
CrewMembers: [Schema.Types.Mixed],
736
CrewShipSalvagedWeaponSkins: [Schema.Types.Mixed],
737
CrewShipSalvagedWeapons: [Schema.Types.Mixed],
738
739
//Complete Mission\Quests
633
//Complete Mission
740
634
Missions: [Schema.Types.Mixed],
741
QuestKeys: [questKeysSchema],
742
//item like DojoKey or Boss missions key
743
LevelKeys: [Schema.Types.Mixed],
744
//Active quests
745
Quests: [Schema.Types.Mixed],
746
635
747
636
//Cosmetics like profile glyphs\Kavasa Prime Kubrow Collar\Game Theme etc
748
637
FlavourItems: [FlavourItemSchema],
749
638
750
//Lunaro Weapon
751
Scoops: [EquipmentSchema],
752
753
639
//Mastery Rank*(Need item XPInfo to rank up)
754
640
PlayerLevel: Number,
755
641
//Item Mastery Rank exp
756
642
XPInfo: [TypeXPItemSchema],
757
643
//Mastery Rank next availability
758
644
TrainingDate: Date,
759
//Retries rank up(3 time)
760
TrainingRetriesLeft: Number,
761
762
//you saw last played Region when you opened the star map
763
LastRegionPlayed: String,
764
645
765
646
//Blueprints for Foundry
766
647
Recipes: [typeCountSchema],
@@ -770,116 +651,35 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
770
651
//Skins for Suits, Weapons etc.
771
652
WeaponSkins: [weaponSkinsSchema],
772
653
773
//Ayatan Item
774
FusionTreasures: [fusionTreasuresSchema],
775
//only used for Maroo apparently - { "node": "TreasureTutorial", "state": "TS_COMPLETED" }
776
TauntHistory: { type: [tauntSchema], default: undefined },
777
778
654
//noShow2FA,VisitPrimeVault etc
779
655
WebFlags: Schema.Types.Mixed,
780
656
//Id CompletedAlerts
781
657
CompletedAlerts: [String],
782
658
783
//Warframe\Duviri
784
StoryModeChoice: String,
785
786
//Alert->Kuva Siphon
787
PeriodicMissionCompletions: [periodicMissionCompletionsSchema],
788
789
//Codex->LoreFragment
790
LoreFragmentScans: [loreFragmentScansSchema],
791
659
792
660
//Resource,Credit,Affinity etc or Bless any boosters
793
661
Boosters: [boosterSchema],
794
BlessingCooldown: Date, // Date convert to IMongoDate
795
796
//the color your clan requests like Items/Research/DojoColors/DojoColorPlainsB
797
ActiveDojoColorResearch: String,
798
799
SentientSpawnChanceBoosters: Schema.Types.Mixed,
800
801
QualifyingInvasions: [Schema.Types.Mixed],
802
FactionScores: [Number],
803
804
//Have only Suit+Pistols+LongGuns+Melee+ItemType(BronzeSpectre,GoldSpectre,PlatinumSpectreArmy,SilverSpectreArmy)
805
//"/Lotus/Types/Game/SpectreArmies/BronzeSpectreArmy": "Vapor Specter Regiment",
806
SpectreLoadouts: [spectreLoadoutsSchema],
807
//If you want change Spectre Gear id
808
PendingSpectreLoadouts: [Schema.Types.Mixed],
809
662
810
663
//New Quest Email
811
664
EmailItems: [TypeXPItemSchema],
812
665
813
//Profile->Wishlist
814
Wishlist: [String],
815
816
666
//https://warframe.fandom.com/wiki/Alignment
817
667
//like "Alignment": { "Wisdom": 9, "Alignment": 1 },
818
668
Alignment: Schema.Types.Mixed,
819
669
AlignmentReplay: Schema.Types.Mixed,
820
670
821
//https://warframe.fandom.com/wiki/Sortie
822
CompletedSorties: [String],
823
LastSortieReward: [Schema.Types.Mixed],
824
825
//Resource_Drone[Uselees stuff]
826
Drones: [Schema.Types.Mixed],
827
828
671
//Active profile ico
829
672
ActiveAvatarImageType: String,
830
673
831
// open location store like EidolonPlainsDiscoverable or OrbVallisCaveDiscoverable
832
DiscoveredMarkers: [Schema.Types.Mixed],
833
//Open location mission like "JobId" + "StageCompletions"
834
CompletedJobs: [Schema.Types.Mixed],
835
836
//Game mission\ivent score example "Tag": "WaterFight", "Best": 170, "Count": 1258,
837
PersonalGoalProgress: [Schema.Types.Mixed],
838
839
//Setting interface Style
840
ThemeStyle: String,
841
ThemeBackground: String,
842
ThemeSounds: String,
843
844
//Daily LoginRewards
845
LoginMilestoneRewards: [String],
846
847
674
//You first Dialog with NPC or use new Item
848
675
NodeIntrosCompleted: [String],
849
676
850
677
//Current guild id, if applicable.
851
678
GuildId: { type: Schema.Types.ObjectId, ref: "Guild" },
852
679
853
//https://warframe.fandom.com/wiki/Heist
854
//ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name
855
CompletedJobChains: [completedJobChainsSchema],
856
//Night Wave Challenge
857
SeasonChallengeHistory: [seasonChallengeHistorySchema],
858
859
//Cephalon Simaris Entries Example:"TargetType"+"Scans"(1-10)+"Completed": true|false
860
LibraryPersonalProgress: [Schema.Types.Mixed],
861
//Cephalon Simaris Daily Task
862
LibraryAvailableDailyTaskInfo: Schema.Types.Mixed,
863
864
//https://warframe.fandom.com/wiki/Invasion
865
InvasionChainProgress: [Schema.Types.Mixed],
866
867
//https://warframe.fandom.com/wiki/Parazon
868
DataKnives: [EquipmentSchema],
869
870
//CorpusLich or GrineerLich
871
NemesisAbandonedRewards: [String],
872
//CorpusLich\KuvaLich
873
NemesisHistory: [Schema.Types.Mixed],
874
LastNemesisAllySpawnTime: Schema.Types.Mixed,
875
876
680
//TradingRulesConfirmed,ShowFriendInvNotifications(Option->Social)
877
681
Settings: settingsSchema,
878
682
879
//Railjack craft
880
//https://warframe.fandom.com/wiki/Rising_Tide
881
PersonalTechProjects: [Schema.Types.Mixed],
882
883
683
//Modulars lvl and exp(Railjack|Duviri)
884
684
//https://warframe.fandom.com/wiki/Intrinsics
885
685
PlayerSkills: playerSkillsSchema,
@@ -887,42 +687,15 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
887
687
//TradeBannedUntil data
888
688
TradeBannedUntil: Schema.Types.Mixed,
889
689
890
//https://warframe.fandom.com/wiki/Helminth
891
InfestedFoundry: infestedFoundrySchema,
892
893
NextRefill: Schema.Types.Mixed, // Date, convert to IMongoDate
894
895
//Purchase this new permanent skin from the Lotus customization options in Personal Quarters located in your Orbiter.
896
//https://warframe.fandom.com/wiki/Lotus#The_New_War
897
LotusCustomization: Schema.Types.Mixed,
898
899
//Progress+Rank+ItemType(ZarimanPumpShotgun)
900
//https://warframe.fandom.com/wiki/Incarnon
901
EvolutionProgress: { type: [evolutionProgressSchema], default: undefined },
902
690
903
691
//Unknown and system
904
DuviriInfo: DuviriInfoSchema,
905
692
Mailbox: MailboxSchema,
906
KahlLoadOuts: [Schema.Types.Mixed],
907
693
HandlerPoints: Number,
908
694
ChallengesFixVersion: Number,
909
695
PlayedParkourTutorial: Boolean,
910
696
SubscribedToEmailsPersonalized: Number,
911
LastInventorySync: Schema.Types.Mixed, // this should be Schema.Types.ObjectId, but older inventories may break with that.
912
ActiveLandscapeTraps: [Schema.Types.Mixed],
913
RepVotes: [Schema.Types.Mixed],
914
LeagueTickets: [Schema.Types.Mixed],
915
HasContributedToDojo: Boolean,
916
HWIDProtectEnabled: Boolean,
917
LoadOutPresets: { type: Schema.Types.ObjectId, ref: "Loadout" },
918
CurrentLoadOutIds: [Schema.Types.Mixed],
919
RandomUpgradesIdentified: Number,
920
BountyScore: Number,
921
ChallengeInstanceStates: [Schema.Types.Mixed],
922
RecentVendorPurchases: [Schema.Types.Mixed],
697
LastInventorySync: Schema.Types.Mixed,
923
698
Robotics: [Schema.Types.Mixed],
924
UsedDailyDeals: [Schema.Types.Mixed],
925
CollectibleSeries: [Schema.Types.Mixed],
926
699
HasResetAccount: Boolean,
927
700
928
701
//Discount Coupon
@@ -25,15 +25,7 @@ const databaseAccountSchema = new Schema<IDatabaseAccountDocument>(
25
25
email: { type: String, required: true, unique: true },
26
26
password: { type: String, required: true },
27
27
DisplayName: { type: String, required: true },
28
CountryCode: { type: String, required: true },
29
ClientType: { type: String },
30
CrossPlatformAllowed: { type: Boolean, required: true },
31
ForceLogoutVersion: { type: Number, required: true },
32
AmazonAuthToken: { type: String },
33
AmazonRefreshToken: { type: String },
34
ConsentNeeded: { type: Boolean, required: true },
35
TrackedSettings: { type: [String], default: [] },
36
Nonce: { type: Number, default: 0 }
28
Nonce: { type: Number, required: true }
37
29
},
38
30
opts
39
31
);
@@ -64,6 +64,8 @@ import { updateChallengeProgressController } from "@/src/controllers/api/updateC
64
64
import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController";
65
65
import { updateThemeController } from "../controllers/api/updateThemeController";
66
66
import { upgradesController } from "@/src/controllers/api/upgradesController";
67
import { worldStateController } from "../controllers/dynamic/worldStateController";
68
import { updateInventoryController } from "../controllers/api/updateInventoryController";
67
69
68
70
const apiRouter = express.Router();
69
71
@@ -99,6 +101,16 @@ apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
99
101
apiRouter.get("/surveys.php", surveysController);
100
102
apiRouter.get("/updateSession.php", updateSessionGetController);
101
103
104
apiRouter.get('/getMessages.php', (_, response) => {
105
response.json({});
106
})
107
apiRouter.get('/trainingResult.php', (_, response) => {
108
response.status(200);
109
})
110
apiRouter.get('/giveStartingGear.php', (_, response) => {
111
response.status(200);
112
})
113
apiRouter.get('/worldState.php', worldStateController);
102
114
// post
103
115
apiRouter.post("/addFriendImage.php", addFriendImageController);
104
116
apiRouter.post("/artifacts.php", artifactsController);
@@ -138,5 +150,6 @@ apiRouter.post("/updateNodeIntros.php", genericUpdateController);
138
150
apiRouter.post("/updateSession.php", updateSessionPostController);
139
151
apiRouter.post("/updateTheme.php", updateThemeController);
140
152
apiRouter.post("/upgrades.php", upgradesController);
153
apiRouter.post("/updateInventory.php", updateInventoryController);
141
154
142
155
export { apiRouter };
@@ -12,6 +12,11 @@ cacheRouter.get("/B.Cache.Windows_en.bin*", (_req, res) => {
12
12
res.sendFile("static/data/B.Cache.Windows_en_33.0.10.bin", { root: "./" });
13
13
});
14
14
15
16
cacheRouter.get("/H.Cache.bin!03_---------------------w", (_req, res) => {
17
res.sendFile(`static/data/H.Cache.bin`, { root: "./" });
18
});
19
15
20
cacheRouter.get(/^\/origin\/[a-zA-Z0-9]+\/[0-9]+\/H\.Cache\.bin.*$/, (_req, res) => {
16
21
res.sendFile(`static/data/H.Cache_${buildConfig.version}.bin`, { root: "./" });
17
22
});