mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
Daily Reward notification for S6- (StW)
This commit is contained in:
1351
responses/dailyrewards.json
Normal file
1351
responses/dailyrewards.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user