Bug fix for catalog

This commit is contained in:
Lawin0129
2022-02-18 00:40:16 +00:00
parent fce5c098cf
commit b36f83f0a6

View File

@@ -99,14 +99,14 @@ function getItemShop() {
CatalogEntry.requirements = []; CatalogEntry.requirements = [];
CatalogEntry.itemGrants = []; CatalogEntry.itemGrants = [];
for (var i in CatalogConfig[value].itemGrants) { for (var x in CatalogConfig[value].itemGrants) {
if (typeof CatalogConfig[value].itemGrants[i] == "string") { if (typeof CatalogConfig[value].itemGrants[x] == "string") {
if (CatalogConfig[value].itemGrants[i].length != 0) { if (CatalogConfig[value].itemGrants[x].length != 0) {
CatalogEntry.devName = CatalogConfig[value].itemGrants[0] CatalogEntry.devName = CatalogConfig[value].itemGrants[0]
CatalogEntry.offerId = CatalogConfig[value].itemGrants[0] CatalogEntry.offerId = CatalogConfig[value].itemGrants[0]
CatalogEntry.requirements.push({ "requirementType": "DenyOnItemOwnership", "requiredId": CatalogConfig[value].itemGrants[i], "minQuantity": 1 }) CatalogEntry.requirements.push({ "requirementType": "DenyOnItemOwnership", "requiredId": CatalogConfig[value].itemGrants[x], "minQuantity": 1 })
CatalogEntry.itemGrants.push({ "templateId": CatalogConfig[value].itemGrants[i], "quantity": 1 }); CatalogEntry.itemGrants.push({ "templateId": CatalogConfig[value].itemGrants[x], "quantity": 1 });
} }
} }
} }