mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-14 11:19:16 +01:00
Add "CardPack" check for llama purchasing
This commit is contained in:
28
index.js
28
index.js
@@ -3838,8 +3838,8 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
res.end();
|
||||
});
|
||||
|
||||
// Purchase llama STW
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", async (req, res) => {
|
||||
// Purchase llama STW
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", async (req, res) => {
|
||||
function makeid() {
|
||||
let CurrentDate = (new Date()).valueOf().toString();
|
||||
let RandomFloat = Math.random().toString();
|
||||
@@ -3868,6 +3868,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
profile.commandRevision += 1;
|
||||
|
||||
catalog.storefronts.forEach(function(value, a) {
|
||||
if (value.name.toLowerCase().startsWith("cardpack")) {
|
||||
catalog.storefronts[a].catalogEntries.forEach(function(value, b) {
|
||||
if (value.offerId == req.body.offerId) {
|
||||
catalog.storefronts[a].catalogEntries[b].itemGrants.forEach(function(value, c) {
|
||||
@@ -3898,6 +3899,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
PurchasedLlama = true;
|
||||
@@ -3914,6 +3916,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
campaign.commandRevision += 1;
|
||||
|
||||
catalog.storefronts.forEach(function(value, a) {
|
||||
if (value.name.toLowerCase().startsWith("cardpack")) {
|
||||
catalog.storefronts[a].catalogEntries.forEach(function(value, b) {
|
||||
if (value.offerId == req.body.offerId) {
|
||||
catalog.storefronts[a].catalogEntries[b].itemGrants.forEach(function(value, c) {
|
||||
@@ -4116,6 +4119,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
fs.writeFileSync("./profiles/campaign.json", JSON.stringify(campaign, null, 2), function(err) {
|
||||
@@ -4146,10 +4150,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
res.status(200);
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
|
||||
// Set multiple items favorite
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/SetItemFavoriteStatusBatch", async (req, res) => {
|
||||
// Set multiple items favorite
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/SetItemFavoriteStatusBatch", async (req, res) => {
|
||||
const profile = require(`./profiles/${req.query.profileId || "athena"}.json`);
|
||||
|
||||
if (profile.profileId == "athena") {
|
||||
@@ -4214,10 +4218,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
res.status(200);
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
|
||||
// Set favorite on item
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/SetItemFavoriteStatus", async (req, res) => {
|
||||
// Set favorite on item
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/SetItemFavoriteStatus", async (req, res) => {
|
||||
const profile = require(`./profiles/${req.query.profileId || "athena"}.json`);
|
||||
|
||||
if (profile.profileId == "athena") {
|
||||
@@ -4280,10 +4284,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
res.status(200);
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
|
||||
// Mark item as seen
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/MarkItemSeen", async (req, res) => {
|
||||
// Mark item as seen
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/MarkItemSeen", async (req, res) => {
|
||||
const profile = require(`./profiles/${req.query.profileId || "athena"}.json`);
|
||||
|
||||
if (profile.profileId == "athena") {
|
||||
@@ -4348,7 +4352,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
|
||||
})
|
||||
res.status(200);
|
||||
res.end();
|
||||
});
|
||||
});
|
||||
|
||||
// Equip BR Locker 1
|
||||
express.post("/fortnite/api/game/v2/profile/*/client/EquipBattleRoyaleCustomization", async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user