League-of-Foundry-Developers / fvtt-module-lmrtfy

Let Me Roll That For You!
27 stars 51 forks source link

Feature Request: Allow GM to process rolls for player owned characters #167

Open tposney opened 2 years ago

tposney commented 2 years ago

In Midi-qol I broadcast LMRTFY requests targeted to a specific user.

In the case of player owned characters (when the player is not logged in) I want to be able to have the GM take the roll on the users behalf.

The "newish" filter out player owned characters code in lmrtfy.js breaks that behaviour.

        // remove player characters from GM's requests
        if (game.user.isGM) {
            actors = actors.filter(a => !a.hasPlayerOwner);
        }        

This fixes my problem and I don't think it breaks the intent of the check.

        // remove player characters from GM's requests
        if (game.user.isGM && data.user !== game.user.id) {
            actors = actors.filter(a => !a.hasPlayerOwner);
        }