PwQt / magic-items-2

This module for Foundry VTT and specific for the DnD5e system, 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.
https://github.com/PwQt/magic-items-2
MIT License
18 stars 7 forks source link

[BUG] With Ready Set Roll it duplicates the chat message for feature/spell on item #38

Closed david-simoes-93 closed 8 months ago

david-simoes-93 commented 9 months ago

Module Version: v1.4.4

Re-opening https://github.com/PwQt/magic-items-2/issues/22

Same exact issue. Solution is as simple as replacing L1143 to LL1148 by

    if (!game.modules.get("ready-set-roll-5e")?.active) {
        ChatMessage.create(
          mergeObject(chatData, {
            "flags.dnd5e.itemData": this.ownedItem.toJSON()
          })
        );
    }

This maintains ALL the behavior of the module, just fixes the bug when RSR is enabled by preventing the duplicate chat entry

orpheussnacks152 commented 7 months ago

where do you apply this fix for the module?

PwQt commented 7 months ago

@orpheussnacks152 1.6.2 should fix this