Skip to content

Commit

Permalink
Merge pull request #39 from p4535992/master
Browse files Browse the repository at this point in the history
version 1.4.5
  • Loading branch information
p4535992 authored Jan 13, 2024
2 parents 95fc10e + eaefe60 commit f2c8725
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 1.4.5

- Bug fix: https://github.com/PwQt/magic-items-2/issues/22, by using the patch suggested from @david-simoes-93 on https://github.com/PwQt/magic-items-2/issues/38


### 1.4.2-3-4

- Bug fix https://github.com/PwQt/magic-items-2/issues/33
Expand Down
2 changes: 1 addition & 1 deletion src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "magic-items-2",
"title": "Magic Items 2",
"description": "Module that adds the ability to create magical items with spells or feats that belong to the item itself, such as staffs or magic wands, which will be automatically inherited from the character who owns the item.",
"version": "1.4.4",
"version": "1.4.5",
"compatibility": {
"minimum": 11,
"verified": 11,
Expand Down
13 changes: 8 additions & 5 deletions src/scripts/magic-item-entry/MagicItemTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ export class MagicItemTable extends AbstractMagicItemEntry {
if (entity) {
let item = (await actor.createEmbeddedDocuments("Item", [entity]))[0];
const chatData = await item.use({}, { createMessage: false });
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": item,
})
);
// Fix https://github.com/PwQt/magic-items-2/issues/22
if (!game.modules.get("ready-set-roll-5e")?.active) {
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": item,
})
);
}
}
}
}
Expand Down
13 changes: 8 additions & 5 deletions src/scripts/magic-item-owned-entry/OwnedMagicItemFeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ export class OwnedMagicItemFeat extends AbstractOwnedMagicItemEntry {
}
);
if (chatData) {
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": this.ownedItem.toJSON(),
})
);
// Fix https://github.com/PwQt/magic-items-2/issues/22
if (!game.modules.get("ready-set-roll-5e")?.active) {
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": this.ownedItem.toJSON(),
})
);
}
onUsage();
this.magicItem.update();
}
Expand Down
13 changes: 8 additions & 5 deletions src/scripts/magic-item-owned-entry/OwnedMagicItemSpell.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ export class OwnedMagicItemSpell extends AbstractOwnedMagicItemEntry {
}
);
if (chatData) {
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": this.ownedItem.toJSON(),
})
);
// Fix https://github.com/PwQt/magic-items-2/issues/22
if (!game.modules.get("ready-set-roll-5e")?.active) {
ChatMessage.create(
mergeObject(chatData, {
"flags.dnd5e.itemData": this.ownedItem.toJSON(),
})
);
}
this.consume(consumption);
this.magicItem.update();
}
Expand Down

0 comments on commit f2c8725

Please sign in to comment.