Reue socket pour combat avec 0.7.5
This commit is contained in:
parent
41df6257d5
commit
3c6a5e0c4d
@ -526,7 +526,7 @@ export class RdDUtility {
|
|||||||
defenseMsg.content += "<br><a class='chat-card-button' id='esquiver-button' data-attackerid='"+attacker.data._id + "' data-defenderid='" + myTarget.data._id + "'>Esquiver</a></span>";
|
defenseMsg.content += "<br><a class='chat-card-button' id='esquiver-button' data-attackerid='"+attacker.data._id + "' data-defenderid='" + myTarget.data._id + "'>Esquiver</a></span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
defenseMsg.toSocket = (!game.user.isGM) ? true : false;
|
defenseMsg.toSocket = myTarget.hasPlayerOwner;
|
||||||
|
|
||||||
return defenseMsg;
|
return defenseMsg;
|
||||||
}
|
}
|
||||||
@ -543,7 +543,9 @@ export class RdDUtility {
|
|||||||
}
|
}
|
||||||
} else if (sockmsg.msg == "msg_defense" ) {
|
} else if (sockmsg.msg == "msg_defense" ) {
|
||||||
let defenderActor = game.actors.get( sockmsg.data.defenderid );
|
let defenderActor = game.actors.get( sockmsg.data.defenderid );
|
||||||
if ( (game.user.isGM && !defenderActor.isPC) || (defenderActor.isPC && game.user.character.id == defenderActor.id ) ) {
|
console.log("Defense message reçu : ", defenderActor.hasPlayerOwner, game.user.character.id, defenderActor.id);
|
||||||
|
if ( defenderActor ) {
|
||||||
|
if ( (game.user.isGM && !defenderActor.hasPlayerOwner) || (defenderActor.hasPlayerOwner && (game.user.character.id == defenderActor.id) ) ) {
|
||||||
console.log("User is pushing message...", game.user.name);
|
console.log("User is pushing message...", game.user.name);
|
||||||
sockmsg.data.whisper = [ game.user ];
|
sockmsg.data.whisper = [ game.user ];
|
||||||
sockmsg.data.blind = true;
|
sockmsg.data.blind = true;
|
||||||
@ -552,6 +554,7 @@ export class RdDUtility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async chatListeners( html )
|
static async chatListeners( html )
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||||
"version": "0.9.33",
|
"version": "0.9.34",
|
||||||
"minimumCoreVersion": "0.7.5",
|
"minimumCoreVersion": "0.7.5",
|
||||||
"compatibleCoreVersion": "0.7.6",
|
"compatibleCoreVersion": "0.7.6",
|
||||||
"templateVersion": 44,
|
"templateVersion": 44,
|
||||||
|
Loading…
Reference in New Issue
Block a user