11.2.19 - Les hémorroïdes d'Akarlikarlikar #697
@ -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;
|
||||
}
|
||||
|
@ -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, {
|
||||
|
Loading…
Reference in New Issue
Block a user