Skip to content

Commit 64dc971

Browse files
authored
Added dedicated_server endpoints
1 parent d36da90 commit 64dc971

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

backend/structure/mcp.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7932,6 +7932,35 @@ express.post("/fortnite/api/game/v2/profile/*/client/SetHeroCosmeticVariants", a
79327932
res.end();
79337933
});
79347934

7935+
// any dedicated_server request
7936+
express.post("/fortnite/api/game/v2/profile/*/dedicated_server/*", async (req, res) => {
7937+
const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`);
7938+
7939+
// do not change any of these or you will end up breaking it
7940+
var ApplyProfileChanges = [];
7941+
var BaseRevision = profile.rvn || 0;
7942+
var QueryRevision = req.query.rvn || -1;
7943+
7944+
// this doesn't work properly on version v12.20 and above but whatever
7945+
if (QueryRevision != BaseRevision) {
7946+
ApplyProfileChanges = [{
7947+
"changeType": "fullProfileUpdate",
7948+
"profile": profile
7949+
}];
7950+
}
7951+
7952+
res.json({
7953+
"profileRevision": profile.rvn || 0,
7954+
"profileId": req.query.profileId || "athena",
7955+
"profileChangesBaseRevision": BaseRevision,
7956+
"profileChanges": ApplyProfileChanges,
7957+
"profileCommandRevision": profile.commandRevision || 0,
7958+
"serverTime": new Date().toISOString(),
7959+
"responseVersion": 1
7960+
})
7961+
res.end();
7962+
});
7963+
79357964
// any mcp request that doesn't have something assigned to it
79367965
express.post("/fortnite/api/game/v2/profile/*/client/*", async (req, res) => {
79377966
const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`);

0 commit comments

Comments
 (0)