Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
espositos committed Jan 7, 2021
2 parents 1c83b9f + 1d8deec commit edfdbac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog# Changelog

## [0.10.21] 2020-01-07
### Bugfix
- DND5e - Fix support for magic items with new attunement changes

## [0.10.20] 2020-01-04
### Added
- DND5e - Adds support for Obsidian 5e thanks to Avelyne#3141 (select Obsidian Character Sheets in the setting's HUD roll handler)
Expand Down
11 changes: 9 additions & 2 deletions scripts/actions/magicItemsExtender.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,14 @@ export class MagicItemActionListExtender extends ActionListExtender {
return magicItem.item.data.data.equipped;
}

_isItemAttuned(magicItem) {
return magicItem.item.data.data.attuned;
_isItemAttuned(magicItem) {
var itemData = magicItem.item.data.data;
if (!!itemData.attuned)
return itemData.attuned;

if (!!itemData.attunement)
return CONFIG.DND5E.attunementTypes.ATTUNED === itemData.attunement;

return false;
}
}

0 comments on commit edfdbac

Please sign in to comment.