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.toSocket = (!game.user.isGM) ? true : false;
|
||||
defenseMsg.toSocket = myTarget.hasPlayerOwner;
|
||||
|
||||
return defenseMsg;
|
||||
}
|
||||
@ -543,12 +543,15 @@ export class RdDUtility {
|
||||
}
|
||||
} else if (sockmsg.msg == "msg_defense" ) {
|
||||
let defenderActor = game.actors.get( sockmsg.data.defenderid );
|
||||
if ( (game.user.isGM && !defenderActor.isPC) || (defenderActor.isPC && game.user.character.id == defenderActor.id ) ) {
|
||||
console.log("User is pushing message...", game.user.name);
|
||||
sockmsg.data.whisper = [ game.user ];
|
||||
sockmsg.data.blind = true;
|
||||
sockmsg.data.rollMode = "blindroll";
|
||||
ChatMessage.create( sockmsg.data );
|
||||
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);
|
||||
sockmsg.data.whisper = [ game.user ];
|
||||
sockmsg.data.blind = true;
|
||||
sockmsg.data.rollMode = "blindroll";
|
||||
ChatMessage.create( sockmsg.data );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"version": "0.9.33",
|
||||
"version": "0.9.34",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.6",
|
||||
"templateVersion": 44,
|
||||
|
Loading…
Reference in New Issue
Block a user