diff --git a/changelog.md b/changelog.md index 804f69d8..a96248bf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Item Piles Changelog +## Version 2.8.18 + +- Fixed items sometimes losing their flags when added vaults + ## Version 2.8.17 - Fixed swapping items in vaults would sometimes allow you to swap items so that one ended up outside the bounds of the vault diff --git a/src/helpers/pile-utilities.js b/src/helpers/pile-utilities.js index 63a9e623..6c971878 100644 --- a/src/helpers/pile-utilities.js +++ b/src/helpers/pile-utilities.js @@ -2044,7 +2044,7 @@ export async function rollMerchantTables({ tableData = false, actor = false } = if (existingItem) { existingItem.quantity += Math.max(newItem.quantity, 1); } else { - setProperty(newItem, CONSTANTS.FLAGS.ITEM, newItem.item.flags); + setProperty(newItem, CONSTANTS.FLAGS.ITEM, cleanItemFlagData(getProperty(newItem.item.flags, CONSTANTS.FLAGS.ITEM))); if (game.itempiles.API.QUANTITY_FOR_PRICE_ATTRIBUTE && !getProperty(newItem, game.itempiles.API.QUANTITY_FOR_PRICE_ATTRIBUTE)) { setProperty(newItem, game.itempiles.API.QUANTITY_FOR_PRICE_ATTRIBUTE, Utilities.getItemQuantity(newItem.item)); }