[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:
Dapoulp 2025-08-17 18:40:47 +02:00 committed by GitHub
parent 667edda50a
commit 6100f3cf9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;