Added Sidekicks' customization support

This commit is contained in:
PRO100KatYT
2025-11-08 16:34:52 +01:00
parent 8e9758271a
commit 7baaa84081
3 changed files with 69 additions and 1 deletions

View File

@@ -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");

View File

@@ -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`);

View File

@@ -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",