Item Shop V2 support for the item shop config.

This commit is contained in:
PRO100KatYT
2023-06-18 15:13:27 +02:00
parent a20c1a3a43
commit eedf16ebb6
3 changed files with 42 additions and 1 deletions
+30
View File
@@ -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",
+3
View File
@@ -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"
}
}],
+9 -1
View File
@@ -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;