Fix remoteActorCall

This commit is contained in:
2023-08-13 20:42:54 +02:00
parent 6de4fff403
commit 3c062afd56
3 changed files with 16 additions and 6 deletions

View File

@ -1741,6 +1741,7 @@ export class RdDActor extends RdDBaseActor {
async consommerNourritureboisson(itemId, choix = { doses: 1, seForcer: false, supprimerSiZero: false }, userId = undefined) {
if (userId != undefined && userId != game.user.id) {
RdDBaseActor.remoteActorCall({
tokenId: actor.token?.id,
actorId: this.id,
method: 'consommerNourritureboisson',
args: [itemId, choix, userId]
@ -3121,7 +3122,7 @@ export class RdDActor extends RdDBaseActor {
async onRollTachePremiersSoins(blessureId, rollData) {
if (!this.isOwner) {
return RdDBaseActor.remoteActorCall({ actorId: this.id, method: 'onRollTachePremiersSoins', args: [blessureId, rollData] });
return RdDBaseActor.remoteActorCall({ tokenId: actor.token?.id, actorId: this.id, method: 'onRollTachePremiersSoins', args: [blessureId, rollData] });
}
const blessure = this.getItem(blessureId, 'blessure')
console.log('TODO update blessure', this, blessureId, rollData, rollData.tache);
@ -3151,7 +3152,7 @@ export class RdDActor extends RdDBaseActor {
async onRollSoinsComplets(blessureId, rollData) {
if (!this.isOwner) {
return RdDBaseActor.remoteActorCall({ actorId: this.id, method: 'onRollSoinsComplets', args: [blessureId, rollData] });
return RdDBaseActor.remoteActorCall({ tokenId: actor.token?.id, actorId: this.id, method: 'onRollSoinsComplets', args: [blessureId, rollData] });
}
const blessure = this.getItem(blessureId, 'blessure')
if (blessure && blessure.system.premierssoins.done && !blessure.system.soinscomplets.done) {
@ -3245,6 +3246,7 @@ export class RdDActor extends RdDBaseActor {
const attackerId = attacker?.id;
if (ReglesOptionnelles.isUsing('validation-encaissement-gr') && !game.user.isGM) {
RdDBaseActor.remoteActorCall({
tokenId: actor.token?.id,
actorId: this.id,
method: 'appliquerEncaissement',
args: [rollData, show, attackerId]