From 511ee5f241711896ae8a9a388d5cd6e1d3db30f5 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 12 Nov 2023 21:03:41 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20encaissement=20joueur=20=C3=A0=20valider?= =?UTF-8?q?=20par=20MJ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor.js | 6 +++--- module/actor/base-actor-reve.js | 2 +- module/rdd-tmr-dialog.js | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/module/actor.js b/module/actor.js index 2e839390..53556495 100644 --- a/module/actor.js +++ b/module/actor.js @@ -256,7 +256,7 @@ export class RdDActor extends RdDBaseActorSang { const isMaladeEmpoisonne = maladiesPoisons.length > 0; this._messageRecuperationMaladiePoisons(maladiesPoisons, message); - await this._recuperationBlessures(message, isMaladeEmpoisonne); + await this._recupererBlessures(message, isMaladeEmpoisonne); await this._recupererVie(message, isMaladeEmpoisonne); } @@ -367,7 +367,7 @@ export class RdDActor extends RdDBaseActorSang { } /* -------------------------------------------- */ - async _recuperationBlessures(message, isMaladeEmpoisonne) { + async _recupererBlessures(message, isMaladeEmpoisonne) { const timestamp = game.system.rdd.calendrier.getTimestamp() const blessures = this.filterItems(it => it.system.gravite > 0, TYPES.blessure).sort(Misc.ascending(it => it.system.gravite)) @@ -661,7 +661,7 @@ export class RdDActor extends RdDBaseActorSang { /* -------------------------------------------- */ async sortMisEnReserve(sort, draconic, coord, ptreve) { await this.createEmbeddedDocuments("Item", [{ - type: 'sortreserve', + type: TYPES.sortreserve, name: sort.name, img: sort.img, system: { sortid: sort._id, draconic: (draconic?.name ?? sort.system.draconic), ptreve: ptreve, coord: coord, heurecible: 'Vaisseau' } diff --git a/module/actor/base-actor-reve.js b/module/actor/base-actor-reve.js index 3b1ee283..5395161d 100644 --- a/module/actor/base-actor-reve.js +++ b/module/actor/base-actor-reve.js @@ -427,7 +427,7 @@ export class RdDBaseActorReve extends RdDBaseActor { RdDBaseActor.remoteActorCall({ tokenId: this.token?.id, actorId: this.id, - method: 'appliquerEncaissement', + method: 'encaisserDommages', args: [rollData, show, attackerId] }); return; diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index 1080f6f5..4bec890c 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -16,6 +16,7 @@ import { RdDDice } from "./rdd-dice.js"; import { STATUSES } from "./settings/status-effects.js"; import { RdDRencontre } from "./item/rencontre.js"; import { RdDTimestamp } from "./time/rdd-timestamp.js"; +import { TYPES } from "./item.js"; /* -------------------------------------------- */ @@ -110,11 +111,11 @@ export class RdDTMRDialog extends Dialog { } get sortsReserve() { - return this.actor.itemTypes['sortreserve']; + return this.actor.itemTypes[TYPES.sortreserve]; } getSortsReserve(coord) { - return this.actor.itemTypes['sortreserve'].filter(// Reserve sur une case fleuve ou normale + return this.actor.itemTypes[TYPES.sortreserve].filter(// Reserve sur une case fleuve ou normale TMRUtility.getTMR(coord).type == 'fleuve' ? it => TMRUtility.getTMR(it.system.coord).type == 'fleuve' : it => it.system.coord == coord @@ -166,7 +167,7 @@ export class RdDTMRDialog extends Dialog { return this.rencontresExistantes.map(it => this._tokenRencontre(it)); } _getTokensSortsReserve() { - return this.actor.itemTypes['sortreserve'].map(it => this._tokenSortEnReserve(it)); + return this.actor.itemTypes[TYPES.sortreserve].map(it => this._tokenSortEnReserve(it)); } /* -------------------------------------------- */