mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 10:52:23 +01:00
Theater fix for 15.30+
This commit is contained in:
20
index.js
20
index.js
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user