Correction erreur onMsgEncaisser
Pas d'actor passé pour déterminer si on doit gérer le message
This commit is contained in:
parent
864194e3b4
commit
a91264cd82
@ -435,11 +435,10 @@ export class RdDCombat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static onMsgEncaisser(msg) {
|
||||
if (Misc.isOwnerPlayerOrUniqueConnectedGM()) {
|
||||
let defender = canvas.tokens.get(msg.defenderToken.id).actor;
|
||||
if (Misc.isOwnerPlayerOrUniqueConnectedGM(defender)) {
|
||||
let attackerRoll = msg.attackerRoll;
|
||||
let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : undefined;
|
||||
let defender = canvas.tokens.get(msg.defenderToken.id).actor;
|
||||
|
||||
defender.encaisserDommages(attackerRoll, attacker, msg.attackerToken);
|
||||
const rddCombat = RdDCombat.rddCombatForAttackerAndDefender(msg.attackerId, msg.attackerToken.id, msg.defenderToken.id);
|
||||
rddCombat?.removeChatMessageActionsPasseArme(attackerRoll.passeArme);
|
||||
|
Loading…
Reference in New Issue
Block a user