From cf01d26bfe07890867d607ed38401bee1f5dc5c7 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 4 Jun 2021 01:44:31 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20forcer=20R=C3=AAve=20pour=20lancer=20un?= =?UTF-8?q?=20sort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Au cas où la carac par défaut pour le draconic n'est pas rêve --- module/actor.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/actor.js b/module/actor.js index 8b95a60c..f6b367fd 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2152,7 +2152,12 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ computeDraconicAndSortIndex(sortList) { - let draconicList = this.getDraconicList().map(d => duplicate(Misc.data(d))); + let draconicList = this.getDraconicList() + .map(it => { + it = duplicate(Misc.data(it)) + it.data.defaut_carac = "reve"; + return it; + }); for (let sort of sortList) { let draconicsSort = this.getDraconicsSort(draconicList, sort).map(it => it.name); for (let index = 0; index < draconicList.length && sort.data.listIndex == undefined; index++) { @@ -2203,8 +2208,8 @@ export class RdDActor extends Actor { forceCarac: { 'reve': reve }, selectedCarac: reve, draconicList: draconicList, - sortList: sortList, competence: draconicList[0], + sortList: sortList, selectedSort: sortList[0], tmr: TMRUtility.getTMR(coord), diffLibre: RdDItemSort.getDifficulte(sortList[0], -7), // Per default at startup