From 64dc971da499f1856f40af992d0068c5801e344b Mon Sep 17 00:00:00 2001 From: Gray Date: Sat, 22 Mar 2025 07:47:46 -0400 Subject: [PATCH] Added dedicated_server endpoints --- backend/structure/mcp.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/backend/structure/mcp.js b/backend/structure/mcp.js index 36a52fa..d853be0 100644 --- a/backend/structure/mcp.js +++ b/backend/structure/mcp.js @@ -7932,6 +7932,35 @@ express.post("/fortnite/api/game/v2/profile/*/client/SetHeroCosmeticVariants", a res.end(); }); +// any dedicated_server request +express.post("/fortnite/api/game/v2/profile/*/dedicated_server/*", async (req, res) => { + const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`); + + // do not change any of these or you will end up breaking it + var ApplyProfileChanges = []; + var BaseRevision = profile.rvn || 0; + var QueryRevision = req.query.rvn || -1; + + // this doesn't work properly on version v12.20 and above but whatever + if (QueryRevision != BaseRevision) { + ApplyProfileChanges = [{ + "changeType": "fullProfileUpdate", + "profile": profile + }]; + } + + res.json({ + "profileRevision": profile.rvn || 0, + "profileId": req.query.profileId || "athena", + "profileChangesBaseRevision": BaseRevision, + "profileChanges": ApplyProfileChanges, + "profileCommandRevision": profile.commandRevision || 0, + "serverTime": new Date().toISOString(), + "responseVersion": 1 + }) + res.end(); +}); + // any mcp request that doesn't have something assigned to it express.post("/fortnite/api/game/v2/profile/*/client/*", async (req, res) => { const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`);