diff --git a/structure/main.js b/structure/main.js index d11d1a3..cd59823 100644 --- a/structure/main.js +++ b/structure/main.js @@ -216,6 +216,13 @@ express.get("/fortnite/api/game/v2/enabled_features", async (req, res) => { res.json([]) }) +// Sidekicks' icons +express.get("/v1/item/*", async (req, res) => { + res.set("Content-Type", "image/png"); + const lawinpfp = fs.readFileSync(path.join(__dirname, "..", "public", "images", "lawinpfp.png")); + res.send(lawinpfp); +}) + express.get("/api/v1/events/Fortnite/download/*", async (req, res) => { const tournament = require("./../responses/Athena/Tournament/tournament.json"); diff --git a/structure/mcp.js b/structure/mcp.js index fde82d2..c9431a9 100644 --- a/structure/mcp.js +++ b/structure/mcp.js @@ -8555,6 +8555,67 @@ express.put("/api/locker/v4/:deploymentId/account/:accountId/active-loadout-grou res.end(); }); +// Set immutable item attributes (e.g. sidekicks) +express.post("/api/locker/v4/:deploymentId/account/:accountId/lock-in-immutable-item/:cosmeticItemId", async (req, res) => { + const profile = require("./../profiles/athena.json"); + var StatChanged = false; + + var itemGuid = req.params.cosmeticItemId.split(":")[2] || ""; + + if (itemGuid) { + for (const [key, value] of Object.entries(req.body.variants)) { + if (!profile.items[itemGuid].attributes.hasOwnProperty("variants")) { + profile.items[itemGuid].attributes.variants = []; + } + profile.items[itemGuid].attributes.variants.push({ + "channel": key, + "active": value.variantTag, + "owned": [] + }) + } + profile.items[itemGuid].attributes.locked_in = true; + + StatChanged = true; + } + + if (StatChanged == true) { + profile.rvn += 1; + profile.commandRevision += 1; + + fs.writeFileSync("./profiles/athena.json", JSON.stringify(profile, null, 2)); + } + + res.status(204); + res.end(); +}); + +// Set companion name +express.patch("/api/locker/v4/:deploymentId/account/:accountId/companion-name", async (req, res) => { + const profile = require("./../profiles/athena.json"); + var StatChanged = false; + + if (req.body.cosmeticItemId && req.body.companionName) { + var itemGuid = req.body.cosmeticItemId.split(":")[2]; + profile.items[itemGuid].attributes.variants.push({ + "channel": "CustomName", + "active": req.body.companionName, + "owned": [] + }) + + StatChanged = true; + } + + if (StatChanged == true) { + profile.rvn += 1; + profile.commandRevision += 1; + + fs.writeFileSync("./profiles/athena.json", JSON.stringify(profile, null, 2)); + } + + res.status(204); + res.end(); +}); + // Set Active Archetype (e.g. main vehicle in v30.00+) express.post("/fortnite/api/game/v2/profile/*/client/SetActiveArchetype", async (req, res) => { const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`); diff --git a/structure/user.js b/structure/user.js index b9359fe..1cf8c1a 100644 --- a/structure/user.js +++ b/structure/user.js @@ -79,7 +79,7 @@ express.post("/auth/v1/oauth/token", async (req, res) => { "expires_in": 28800, "expires_at": "9999-12-31T23:59:59.999Z", "nonce": "lawinserver", - "features": ["AntiCheat", "Connect", "Ecom", "Inventories", "LockerService"], + "features": ["AntiCheat", "CommerceService", "Connect", "ContentService", "Ecom", "EpicConnect", "Inventories", "LockerService", "MagpieService", "Matchmaking Service", "PCBService", "QuestService", "Stats"], "deployment_id": "lawinsdeploymentidlol", "organization_id": "lawinsorganizationidlol", "organization_user_id": "lawinsorganisationuseridlol",