From 48acf42d5c023e10566aebde9b8007c4b022e8f3 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 11 Jun 2021 01:41:28 +0200 Subject: [PATCH] Fix: warn si /stress sans valeur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sans quoi ça supprime la valeur de stress de tous les joueurs --- module/rdd-utility.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 4daa2008..1335b4af 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -888,6 +888,10 @@ export class RdDUtility { /*-------------------------------------------- */ static distribuerStress(stressValue, raison = 'Inconnu', nomJoueur = undefined) { if (game.user.isGM) { + if (stressValue == undefined){ + ui.notifications.warn("Pas de valeuir de stress à distribuer!"); + return; + } if (nomJoueur == undefined) { for (let actor of game.actors) { if (actor.hasPlayerOwner) {