Skip to content

Commit

Permalink
Fixed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Jan 22, 2024
1 parent 39b9fed commit 2d2da2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Item Piles Changelog

## Version 2.8.19

- Fixed merchant populate items table rolling not working

## Version 2.8.18

- Fixed items sometimes losing their flags when added vaults
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/pile-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, cleanItemFlagData(getProperty(newItem.item.flags, CONSTANTS.FLAGS.ITEM)));
setProperty(newItem, CONSTANTS.FLAGS.ITEM, cleanItemFlagData(getProperty(newItem.item, 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));
}
Expand Down

0 comments on commit 2d2da2d

Please sign in to comment.