11.2.19 - Les hémorroïdes d'Akarlikarlikar #697

Merged
uberwald merged 2 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-05-01 08:59:34 +02:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit fad894704d - Show all commits

View File

@ -421,6 +421,10 @@ export class RdDBaseActorReve extends RdDBaseActor {
/* -------------------------------------------- */
async encaisser() { await RdDEncaisser.encaisser(this) }
async encaisserDommagesRemote(rollData, attackerId, show) {
const attacker = game.actors.get(attackerId);
await this.encaisserDommages(rollData, attacker, show)
}
async encaisserDommages(rollData, attacker = undefined, show = undefined) {
if (attacker && !await attacker.accorder(this, 'avant-encaissement')) {
return;
@ -430,8 +434,8 @@ export class RdDBaseActorReve extends RdDBaseActor {
RdDBaseActor.remoteActorCall({
tokenId: this.token?.id,
actorId: this.id,
method: 'encaisserDommages',
args: [rollData, show, attackerId]
method: 'encaisserDommagesRemote',
args: [rollData, attackerId, show]
});
return;
}

View File

@ -1282,7 +1282,7 @@ export class RdDCombat {
attackerRoll.defenderTokenId = defenderTokenId;
await this.computeRecul(defenderRoll);
this.defender.encaisserDommages(attackerRoll, this.attacker, defenderRoll?.show);
await this.defender.encaisserDommages(attackerRoll, this.attacker, defenderRoll?.show);
}
else { // envoi à un GM: les joueurs n'ont pas le droit de modifier les personnages qu'ils ne possèdent pas
game.socket.emit(SYSTEM_SOCKET_ID, {