mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[PR]Fix/allow deal damage button use owner (#985)
* Temp ActionField attack type missing * Move missing attack type to getModel * Fix player not allowed to use Deal Damage button if Actor not assigned
This commit is contained in:
parent
667edda50a
commit
6100f3cf9e
1 changed files with 1 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
async onRollDamage(event, message) {
|
async onRollDamage(event, message) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const actor = await this.getActor(message.system.source.actor);
|
const actor = await this.getActor(message.system.source.actor);
|
||||||
if (game.user.character?.id !== actor.id && !game.user.isGM) return true;
|
if(!actor.isOwner) return true;
|
||||||
if (message.system.source.item && message.system.source.action) {
|
if (message.system.source.item && message.system.source.action) {
|
||||||
const action = this.getAction(actor, message.system.source.item, message.system.source.action);
|
const action = this.getAction(actor, message.system.source.item, message.system.source.action);
|
||||||
if (!action || !action?.rollDamage) return;
|
if (!action || !action?.rollDamage) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue