removeChatMessageId support undefined

Simplifie le code de l'appelant

préparation pour enchantement de potions
This commit is contained in:
Vincent Vandemeulebrouck 2021-06-01 00:10:02 +02:00
parent cc2277c9b7
commit e13750ea68
2 changed files with 4 additions and 5 deletions

View File

@ -40,8 +40,10 @@ export class ChatUtility {
}
static removeChatMessageId(messageId) {
if (messageId){
ChatUtility.removeMessages({ messageId: messageId });
}
}
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {

View File

@ -614,10 +614,7 @@ export class RdDUtility {
let actor = RdDUtility.getSelectedActor("Pour effectuer le paiement:");
if (actor) {
actor.depenserDeniers(sumdenier, objData, quantite, fromActorId);
let chatMessageId = RdDUtility.findChatMessageId(event.currentTarget);
if (chatMessageId) {
ChatUtility.removeChatMessageId(chatMessageId);
}
ChatUtility.removeChatMessageId(RdDUtility.findChatMessageId(event.currentTarget));
}
});
}