From 47727c254504889e8dea1d9089d2d0d7f5d34108 Mon Sep 17 00:00:00 2001 From: PRO100KatYT <67335438+PRO100KatYT@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:19:25 +0100 Subject: [PATCH] Added dedicated_server response --- structure/mcp.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/structure/mcp.js b/structure/mcp.js index d8ad863..6c85d1b 100644 --- a/structure/mcp.js +++ b/structure/mcp.js @@ -8599,6 +8599,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`);