Added BR Quest Pinning & Party Assist

This commit is contained in:
PRO100KatYT
2022-05-27 13:34:07 +02:00
parent 4f70b07e94
commit 8b501981f3
2 changed files with 98 additions and 0 deletions

View File

@@ -83537,6 +83537,8 @@
"battlestars_season_total": 100000, "battlestars_season_total": 100000,
"style_points": 100000, "style_points": 100000,
"alien_style_points": 100000, "alien_style_points": 100000,
"party_assist_quest": "",
"pinned_quest": "",
"purchased_bp_offers": [], "purchased_bp_offers": [],
"favorite_loadingscreen": "", "favorite_loadingscreen": "",
"book_purchased": true, "book_purchased": true,

View File

@@ -505,6 +505,102 @@ express.post("/fortnite/api/game/v2/profile/*/client/RemoveGiftBox", async (req,
res.end(); res.end();
}); });
// Set party assist quest
express.post("/fortnite/api/game/v2/profile/*/client/SetPartyAssistQuest", 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;
var StatChanged = false;
if (profile.stats.attributes.hasOwnProperty("party_assist_quest")) {
profile.stats.attributes.party_assist_quest = req.body.questToPinAsPartyAssist || "";
StatChanged = true;
}
if (StatChanged == true) {
profile.rvn += 1;
profile.commandRevision += 1;
ApplyProfileChanges.push({
"changeType": "statModified",
"name": "party_assist_quest",
"value": profile.stats.attributes.party_assist_quest
})
fs.writeFileSync(`./profiles/${req.query.profileId || "athena"}.json`, JSON.stringify(profile, null, 2));
}
// 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();
});
// Set pinned BR quest
express.post("/fortnite/api/game/v2/profile/*/client/AthenaPinQuest", 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;
var StatChanged = false;
if (profile.stats.attributes.hasOwnProperty("pinned_quest")) {
profile.stats.attributes.pinned_quest = req.body.pinnedQuest || "";
StatChanged = true;
}
if (StatChanged == true) {
profile.rvn += 1;
profile.commandRevision += 1;
ApplyProfileChanges.push({
"changeType": "statModified",
"name": "pinned_quest",
"value": profile.stats.attributes.pinned_quest
})
fs.writeFileSync(`./profiles/${req.query.profileId || "athena"}.json`, JSON.stringify(profile, null, 2));
}
// 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();
});
// Set pinned STW quests // Set pinned STW quests
express.post("/fortnite/api/game/v2/profile/*/client/SetPinnedQuests", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/SetPinnedQuests", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`); const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);