mineur: plus besoin de joueur pour la defense
This commit is contained in:
parent
c77d5e3c93
commit
1d10c0bd3f
@ -491,12 +491,7 @@ export class RdDCombat {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static onMsgDefense(msg) {
|
static onMsgDefense(msg) {
|
||||||
let defenderToken = canvas.tokens.get(msg.defenderTokenId);
|
let defenderToken = canvas.tokens.get(msg.defenderTokenId);
|
||||||
if (defenderToken) {
|
if (defenderToken && Misc.isElectedUser()) {
|
||||||
if (!game.user.isGM && !game.user.character) { // vérification / sanity check
|
|
||||||
ui.notifications.error("Le joueur " + game.user.name + " n'est connecté à aucun personnage. Impossible de continuer.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Misc.isElectedUser()) {
|
|
||||||
const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId);
|
const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId);
|
||||||
if (rddCombat) {
|
if (rddCombat) {
|
||||||
const defenderRoll = msg.defenderRoll;
|
const defenderRoll = msg.defenderRoll;
|
||||||
@ -507,7 +502,6 @@ export class RdDCombat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static _callJetDeVie(event) {
|
static _callJetDeVie(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user