Choisir un GM connecté

Pour le cas où 2 GM sont définis, éviter de passer par un GM inactif
This commit is contained in:
Vincent Vandemeulebrouck 2021-03-14 19:05:42 +01:00
parent 300419cbad
commit 4a76221f07

View File

@ -17,12 +17,11 @@ export class ChatUtility {
const toDelete = game.messages.filter(it => it.data.content.includes(part));
toDelete.forEach(it => it.delete());
}
}
/* -------------------------------------------- */
static removeChatMessageContaining(part) {
const gmId = game.user.isGM ? game.user._id : game.users.entities.find(u => u.isGM)?.id;
const gmId = game.user.isGM ? game.user._id : game.users.entities.find(u => u.isGM && u.active)?.id;
if (!gmId || game.user.isGM) {
ChatUtility.onRemoveMessages(part, game.user._id);