From b36f83f0a69a2a142b54cfe5b67c666ac47ef283 Mon Sep 17 00:00:00 2001 From: Lawin0129 Date: Fri, 18 Feb 2022 00:40:16 +0000 Subject: [PATCH] Bug fix for catalog --- structure/functions.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/structure/functions.js b/structure/functions.js index 34a8614..26c7300 100644 --- a/structure/functions.js +++ b/structure/functions.js @@ -99,14 +99,14 @@ function getItemShop() { CatalogEntry.requirements = []; CatalogEntry.itemGrants = []; - for (var i in CatalogConfig[value].itemGrants) { - if (typeof CatalogConfig[value].itemGrants[i] == "string") { - if (CatalogConfig[value].itemGrants[i].length != 0) { + for (var x in CatalogConfig[value].itemGrants) { + if (typeof CatalogConfig[value].itemGrants[x] == "string") { + if (CatalogConfig[value].itemGrants[x].length != 0) { CatalogEntry.devName = CatalogConfig[value].itemGrants[0] CatalogEntry.offerId = CatalogConfig[value].itemGrants[0] - CatalogEntry.requirements.push({ "requirementType": "DenyOnItemOwnership", "requiredId": CatalogConfig[value].itemGrants[i], "minQuantity": 1 }) - CatalogEntry.itemGrants.push({ "templateId": CatalogConfig[value].itemGrants[i], "quantity": 1 }); + CatalogEntry.requirements.push({ "requirementType": "DenyOnItemOwnership", "requiredId": CatalogConfig[value].itemGrants[x], "minQuantity": 1 }) + CatalogEntry.itemGrants.push({ "templateId": CatalogConfig[value].itemGrants[x], "quantity": 1 }); } } }