mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
1351
responses/dailyrewards.json
Normal file
1351
responses/dailyrewards.json
Normal file
File diff suppressed because it is too large
Load Diff
15552
responses/worldstw.json
15552
responses/worldstw.json
File diff suppressed because it is too large
Load Diff
@@ -134,6 +134,7 @@ function getTheater(req) {
|
|||||||
GetVersionInfo(req, memory);
|
GetVersionInfo(req, memory);
|
||||||
|
|
||||||
var theater = JSON.stringify(require("./../responses/worldstw.json"));
|
var theater = JSON.stringify(require("./../responses/worldstw.json"));
|
||||||
|
var Season = "Season" + memory.season;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (memory.build >= 15.30) {
|
if (memory.build >= 15.30) {
|
||||||
@@ -164,6 +165,15 @@ function getTheater(req) {
|
|||||||
|
|
||||||
theater = JSON.parse(theater)
|
theater = JSON.parse(theater)
|
||||||
|
|
||||||
|
if (theater.hasOwnProperty("Seasonal")) {
|
||||||
|
if (theater.Seasonal.hasOwnProperty(Season)) {
|
||||||
|
theater.theaters = theater.theaters.concat(theater.Seasonal[Season].theaters);
|
||||||
|
theater.missions = theater.missions.concat(theater.Seasonal[Season].missions);
|
||||||
|
theater.missionAlerts = theater.missionAlerts.concat(theater.Seasonal[Season].missionAlerts);
|
||||||
|
}
|
||||||
|
delete theater.Seasonal;
|
||||||
|
}
|
||||||
|
|
||||||
return theater;
|
return theater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1021,9 +1021,12 @@ express.post("/fortnite/api/game/v2/profile/*/client/RefundMtxPurchase", async (
|
|||||||
// Claim STW daily reward
|
// Claim STW daily reward
|
||||||
express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (req, res) => {
|
express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (req, res) => {
|
||||||
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
|
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
|
||||||
|
const DailyRewards = require("./../responses/dailyrewards.json");
|
||||||
|
functions.GetVersionInfo(req, memory);
|
||||||
|
|
||||||
// do not change any of these or you will end up breaking it
|
// do not change any of these or you will end up breaking it
|
||||||
var ApplyProfileChanges = [];
|
var ApplyProfileChanges = [];
|
||||||
|
var Notifications = [];
|
||||||
var BaseRevision = profile.rvn || 0;
|
var BaseRevision = profile.rvn || 0;
|
||||||
var QueryRevision = req.query.rvn || -1;
|
var QueryRevision = req.query.rvn || -1;
|
||||||
var StatChanged = false;
|
var StatChanged = false;
|
||||||
@@ -1048,6 +1051,16 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (r
|
|||||||
"value": profile.stats.attributes.daily_rewards
|
"value": profile.stats.attributes.daily_rewards
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (memory.season < 7) {
|
||||||
|
var Day = profile.stats.attributes.daily_rewards.totalDaysLoggedIn % 336;
|
||||||
|
Notifications.push({
|
||||||
|
"type": "daily_rewards",
|
||||||
|
"primary": true,
|
||||||
|
"daysLoggedIn": profile.stats.attributes.daily_rewards.totalDaysLoggedIn,
|
||||||
|
"items": [DailyRewards[Day]]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fs.writeFileSync(`./profiles/${req.query.profileId || "campaign"}.json`, JSON.stringify(profile, null, 2));
|
fs.writeFileSync(`./profiles/${req.query.profileId || "campaign"}.json`, JSON.stringify(profile, null, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1064,6 +1077,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (r
|
|||||||
"profileId": req.query.profileId || "campaign",
|
"profileId": req.query.profileId || "campaign",
|
||||||
"profileChangesBaseRevision": BaseRevision,
|
"profileChangesBaseRevision": BaseRevision,
|
||||||
"profileChanges": ApplyProfileChanges,
|
"profileChanges": ApplyProfileChanges,
|
||||||
|
"notifications": Notifications,
|
||||||
"profileCommandRevision": profile.commandRevision || 0,
|
"profileCommandRevision": profile.commandRevision || 0,
|
||||||
"serverTime": new Date().toISOString(),
|
"serverTime": new Date().toISOString(),
|
||||||
"responseVersion": 1
|
"responseVersion": 1
|
||||||
|
|||||||
@@ -188,11 +188,6 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"eventType": "EventFlag.Spring2019.Phase2",
|
|
||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"eventType": "EventFlag.LTM_Ashton",
|
"eventType": "EventFlag.LTM_Ashton",
|
||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
@@ -213,6 +208,14 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
})
|
})
|
||||||
|
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
|
||||||
|
activeEvents.push(
|
||||||
|
{
|
||||||
|
"eventType": "EventFlag.Spring2019.Phase2",
|
||||||
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -223,11 +226,6 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"eventType": "EventFlag.Season9.Phase2",
|
|
||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"eventType": "EventFlag.Anniversary2019_BR",
|
"eventType": "EventFlag.Anniversary2019_BR",
|
||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
@@ -248,6 +246,14 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
"activeUntil": "9999-01-01T00:00:00.000Z",
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
})
|
})
|
||||||
|
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
|
||||||
|
activeEvents.push(
|
||||||
|
{
|
||||||
|
"eventType": "EventFlag.Season9.Phase2",
|
||||||
|
"activeUntil": "9999-01-01T00:00:00.000Z",
|
||||||
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memory.season == 10) {
|
if (memory.season == 10) {
|
||||||
@@ -307,7 +313,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
"activeSince": "2020-01-01T00:00:00.000Z"
|
"activeSince": "2020-01-01T00:00:00.000Z"
|
||||||
})
|
})
|
||||||
|
|
||||||
if (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2) {
|
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) >= 2)) {
|
||||||
activeEvents.push(
|
activeEvents.push(
|
||||||
{
|
{
|
||||||
"eventType": "EventFlag.Starlight",
|
"eventType": "EventFlag.Starlight",
|
||||||
@@ -316,7 +322,7 @@ express.get("/fortnite/api/calendar/v1/timeline", async (req, res) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Number(memory.build.toString().split(".")[1].split("")[0]) < 3) {
|
if (memory.build.toString().includes(".") && (Number(memory.build.toString().split(".")[1].split("")[0]) < 3)) {
|
||||||
activeEvents.push(
|
activeEvents.push(
|
||||||
{
|
{
|
||||||
"eventType": "EventFlag.Season11.Fortnitemares.Quests.Phase1",
|
"eventType": "EventFlag.Season11.Fortnitemares.Quests.Phase1",
|
||||||
|
|||||||
Reference in New Issue
Block a user