Merge pull request #43 from PRO100KatYT/main

Some Winterfest and Save the World stuff.
This commit is contained in:
Lawin0129
2021-12-17 19:35:22 +00:00
committed by GitHub
3 changed files with 4035 additions and 608 deletions

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");
@@ -5579,6 +5597,12 @@ function getContentPages(req) {
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "Winter19"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "Winter19";
contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "Winter19"; contentpages.dynamicbackgrounds.backgrounds.backgrounds[1].stage = "Winter19";
} }
if (seasondata.build == 19.01) {
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].stage = "winter2021";
contentpages.dynamicbackgrounds.backgrounds.backgrounds[0].backgroundimage = "https://cdn2.unrealengine.com/t-bp19-lobby-xmas-2048x1024-f85d2684b4af.png";
contentpages.specialoffervideo.bSpecialOfferEnabled = "true";
}
} catch (err) {} } catch (err) {}
return contentpages; return contentpages;

File diff suppressed because it is too large Load Diff

View File

@@ -5802,6 +5802,23 @@
"lastModified": "2019-06-20T22:06:24.590Z", "lastModified": "2019-06-20T22:06:24.590Z",
"_locale": "en-US" "_locale": "en-US"
}, },
"specialoffervideo": {
"_activeDate": "2021-08-14T23:58:00.000Z",
"_locale": "pl",
"_noIndex": false,
"_title": "specialoffervideo",
"bSpecialOfferEnabled": false,
"jcr:baseVersion": "a7ca237317f1e78e4627c4-c68f-4a12-9480-066c92dd14e5",
"jcr:isCheckedOut": true,
"lastModified": "2021-07-12T16:08:40.485Z",
"specialoffervideo": {
"_type": "SpecialOfferVideoConfig",
"bCheckAutoPlay": true,
"bStreamingEnabled": true,
"videoString": "",
"videoUID": ""
}
},
"subgameinfo": { "subgameinfo": {
"battleroyale": { "battleroyale": {
"image": "", "image": "",