Merge branch 'v1.5-combat' into 'v1.5'
Fix: regression combat See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!299
This commit is contained in:
commit
6696d778c4
@ -422,7 +422,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static combatNouveauTour(combat) {
|
static combatNouveauTour(combat) {
|
||||||
if (Misc.isUniqueSingleUser()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
let turn = combat.turns.find(t => t.token?.id == combat.current.tokenId);
|
let turn = combat.turns.find(t => t.token?.id == combat.current.tokenId);
|
||||||
if (turn?.actor) {
|
if (turn?.actor) {
|
||||||
RdDCombat.displayActorCombatStatus(combat, turn.actor);
|
RdDCombat.displayActorCombatStatus(combat, turn.actor);
|
||||||
@ -540,7 +540,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static onMsgEncaisser(data) {
|
static onMsgEncaisser(data) {
|
||||||
if (Misc.isUniqueSingleUser()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
let attackerRoll = RdDCombat._getAttaque(data.attackerId); // Retrieve the rolldata from the store
|
let attackerRoll = RdDCombat._getAttaque(data.attackerId); // Retrieve the rolldata from the store
|
||||||
let attacker = data.attackerId ? game.actors.get(data.attackerId) : null;
|
let attacker = data.attackerId ? game.actors.get(data.attackerId) : null;
|
||||||
let defender = canvas.tokens.get(data.defenderTokenId).actor;
|
let defender = canvas.tokens.get(data.defenderTokenId).actor;
|
||||||
@ -555,7 +555,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 && Misc.isUniqueSingleUser()) {
|
if (defenderToken && Misc.isUniqueConnectedGM()) {
|
||||||
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;
|
||||||
@ -913,7 +913,7 @@ export class RdDCombat {
|
|||||||
dmg: attackerRoll.dmg,
|
dmg: attackerRoll.dmg,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!Misc.isUniqueSingleUser()) {
|
if (!Misc.isUniqueConnectedGM()) {
|
||||||
this._socketSendMessageDefense(paramChatDefense, defenderRoll);
|
this._socketSendMessageDefense(paramChatDefense, defenderRoll);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1286,7 +1286,7 @@ export class RdDCombat {
|
|||||||
this._onEchecTotal(defenderRoll);
|
this._onEchecTotal(defenderRoll);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.isUniqueSingleUser()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
attackerRoll.attackerId = this.attackerId;
|
attackerRoll.attackerId = this.attackerId;
|
||||||
attackerRoll.defenderTokenId = defenderTokenId;
|
attackerRoll.defenderTokenId = defenderTokenId;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user