Skip to content

Commit

Permalink
Item Shop V2 support for the item shop config.
Browse files Browse the repository at this point in the history
  • Loading branch information
PRO100KatYT committed Jun 18, 2023
1 parent a20c1a3 commit eedf16e
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
30 changes: 30 additions & 0 deletions responses/contentpages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6019,6 +6019,36 @@
"lastModified": "2019-10-29T13:07:27.936Z",
"_locale": "en-US"
},
"shopSections": {
"_title": "shop-sections",
"sectionList": {
"_type": "ShopSectionList",
"sections": [
{
"bSortOffersByOwnership": false,
"bShowIneligibleOffersIfGiftable": false,
"bEnableToastNotification": true,
"background": {
"stage": "default",
"_type": "DynamicBackground",
"key": "vault"
},
"_type": "ShopSection",
"landingPriority": 70,
"bHidden": false,
"sectionId": "Featured",
"bShowTimer": true,
"sectionDisplayName": "LawinServer Item Shop",
"bShowIneligibleOffers": true
}
]
},
"_noIndex": false,
"_activeDate": "2022-12-01T23:45:00.000Z",
"lastModified": "2022-12-01T21:50:44.089Z",
"_locale": "en-US",
"_templateName": "FortniteGameShopSections"
},
"creativenews": {
"news": {
"_type": "Battle Royale News",
Expand Down
3 changes: 3 additions & 0 deletions routes/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ app.get("/fortnite/api/calendar/v1/timeline", (req, res) => {
weeklyStoreEnd: "9999-01-01T00:00:00Z",
stwEventStoreEnd: "9999-01-01T00:00:00.000Z",
stwWeeklyStoreEnd: "9999-01-01T00:00:00.000Z",
sectionStoreEnds: {
Featured: "9999-01-01T00:00:00.000Z"
},
dailyStoreEnd: "9999-01-01T00:00:00Z"
}
}],
Expand Down
10 changes: 9 additions & 1 deletion structs/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,19 @@ function getItemShop() {
if (!Array.isArray(CatalogConfig[value].itemGrants)) continue;
if (CatalogConfig[value].itemGrants.length == 0) continue;

const CatalogEntry = {"devName":"","offerId":"","fulfillmentIds":[],"dailyLimit":-1,"weeklyLimit":-1,"monthlyLimit":-1,"categories":[],"prices":[{"currencyType":"MtxCurrency","currencySubType":"","regularPrice":0,"finalPrice":0,"saleExpiration":"9999-12-02T01:12:00Z","basePrice":0}],"matchFilter":"","filterWeight":0,"appStoreId":[],"requirements":[],"offerType":"StaticPrice","giftInfo":{"bIsEnabled":true,"forcedGiftBoxTemplateId":"","purchaseRequirements":[],"giftRecordIds":[]},"refundable":false,"metaInfo":[],"displayAssetPath":"","itemGrants":[],"sortPriority":0,"catalogGroupPriority":0};
const CatalogEntry = {"devName":"","offerId":"","fulfillmentIds":[],"dailyLimit":-1,"weeklyLimit":-1,"monthlyLimit":-1,"categories":[],"prices":[{"currencyType":"MtxCurrency","currencySubType":"","regularPrice":0,"finalPrice":0,"saleExpiration":"9999-12-02T01:12:00Z","basePrice":0}],"meta":{"SectionId":"Featured","TileSize":"Small"},"matchFilter":"","filterWeight":0,"appStoreId":[],"requirements":[],"offerType":"StaticPrice","giftInfo":{"bIsEnabled":true,"forcedGiftBoxTemplateId":"","purchaseRequirements":[],"giftRecordIds":[]},"refundable":false,"metaInfo":[{"key":"SectionId","value":"Featured"},{"key":"TileSize","value":"Small"}],"displayAssetPath":"","itemGrants":[],"sortPriority":0,"catalogGroupPriority":0};

let i = catalog.storefronts.findIndex(p => p.name == (value.toLowerCase().startsWith("daily") ? "BRDailyStorefront" : "BRWeeklyStorefront"));
if (i == -1) continue;

if (value.toLowerCase().startsWith("daily")) {
// Make featured items appear on the left side of the screen
CatalogEntry.sortPriority = -1;
} else {
CatalogEntry.meta.TileSize = "Normal";
CatalogEntry.metaInfo[1].value = "Normal";
}

for (let itemGrant of CatalogConfig[value].itemGrants) {
if (typeof itemGrant != "string") continue;
if (itemGrant.length == 0) continue;
Expand Down

0 comments on commit eedf16e

Please sign in to comment.