Theater fix for 15.30+

This commit is contained in:
PRO100KatYT
2021-12-17 19:59:13 +01:00
parent 40dd8f0bf2
commit ae9b94b4a1

View File

@@ -5,7 +5,6 @@ const moment = require("moment");
const crypto = require("crypto"); const crypto = require("crypto");
const path = require("path"); const path = require("path");
const config = require("./config.json"); const config = require("./config.json");
const worldstw = require("./responses/worldstw.json");
const friendslist = require("./responses/friendslist.json"); const friendslist = require("./responses/friendslist.json");
const friendslist2 = require("./responses/friendslist2.json"); const friendslist2 = require("./responses/friendslist2.json");
const keychain = require("./responses/keychain.json"); const keychain = require("./responses/keychain.json");
@@ -1152,6 +1151,7 @@ express.get("/content/api/pages/*", async (req, res) => {
}) })
express.get("/fortnite/api/game/v2/world/info", async (req, res) => { express.get("/fortnite/api/game/v2/world/info", async (req, res) => {
const worldstw = getTheater(req);
res.json(worldstw) res.json(worldstw)
}) })
@@ -5540,6 +5540,24 @@ function getItemShop() {
return catalog; return catalog;
} }
function getTheater(req) {
const seasonchecker = require("./seasonchecker.js");
const seasondata = require("./season.json");
seasonchecker(req, seasondata);
var theater = JSON.stringify(require("./responses/worldstw.json"));
try {
if (seasondata.season >= 16 || seasondata.build == 15.30 || seasondata.build == 15.40 || seasondata.build == 15.50) {
theater = theater.replaceAll(/\/Game\//g, "\/SaveTheWorld\/");
}
} catch (err) {}
theater = JSON.parse(theater)
return theater;
}
function getContentPages(req) { function getContentPages(req) {
const seasonchecker = require("./seasonchecker.js"); const seasonchecker = require("./seasonchecker.js");
const seasondata = require("./season.json"); const seasondata = require("./season.json");