Skip to content

Commit

Permalink
Merge pull request #464 from MangoFVTT/develop
Browse files Browse the repository at this point in the history
release/3.1.2
  • Loading branch information
MangoFVTT authored Jul 25, 2024
2 parents cc9c9fd + 618127d commit 285f34f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/utils/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ChatUtility {
if (!message.flags[MODULE_SHORT].processed) {
$(html).addClass("rsr-hide");

if (type == ROLL_TYPE.ITEM)
if (type == ROLL_TYPE.ITEM && message.isAuthor)
{
ItemUtility.runItemActions(message);
}
Expand All @@ -63,7 +63,7 @@ export class ChatUtility {
}

// This will force dual rolls on non-item messages, since this is the only place we can catch this before it is displayed.
if (message.isOwner && SettingsUtility.getSettingValue(SETTING_NAMES.ALWAYS_ROLL_MULTIROLL) && !ChatUtility.isMessageMultiRoll(message)) {
if (message.isAuthor && SettingsUtility.getSettingValue(SETTING_NAMES.ALWAYS_ROLL_MULTIROLL) && !ChatUtility.isMessageMultiRoll(message)) {
await _enforceDualRolls(message);

if (message.flags[MODULE_SHORT].dual) {
Expand Down Expand Up @@ -258,7 +258,7 @@ async function _injectContent(message, type, html) {
}
case ROLL_TYPE.TOOL:
case ROLL_TYPE.ATTACK:
if (parent && parent.flags[MODULE_SHORT] && message.isOwner) {
if (parent && parent.flags[MODULE_SHORT] && message.isAuthor) {
if (type === ROLL_TYPE.ATTACK) {
parent.flags[MODULE_SHORT].renderAttack = true;
parent.flags.dnd5e.targets = message.flags.dnd5e.targets ?? [];
Expand Down Expand Up @@ -401,7 +401,7 @@ async function _injectAttackRoll(message, html) {

// Remove and re-add enrichers for hit/miss indication
const card = html.closest('.chat-message');
card.find('.evaluation').remove();
card.find('.targets-tray').parent().remove();
message._enrichAttackTargets(card[0]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function _renderMultiRoll(data = {}) {
ignored: tmpResults.some(r => r.discarded) ? true : undefined,
critType: RollUtility.getCritTypeForDie(baseTerm, critOptions),
d20Result: SettingsUtility.getSettingValue(SETTING_NAMES.D20_ICONS_ENABLED) ? d20Rolls.results[i].result : null,
dcResult: isNaN(critOptions.targetValue) ? undefined : (total >= critOptions.targetValue ? "fas fa-check" : "fas fa-xmark")
dcResult: !critOptions.displayChallenge || isNaN(critOptions.targetValue) ? undefined : (total >= critOptions.targetValue ? "fas fa-check" : "fas fa-xmark")
});
}

Expand Down

0 comments on commit 285f34f

Please sign in to comment.