diff --git a/addon-register.js b/addon-register.js index e15ea7d..402e1c5 100644 --- a/addon-register.js +++ b/addon-register.js @@ -11,7 +11,7 @@ const _manage_inn_roll = async (content, msg) => { { msg["type"] = 0; msg["rollMode"] = "gmroll"; - var compendium = game.packs.find(p => p.collection === 'WH4-fr-translation.plats-dauberges'); + var compendium = game.packs.get('WH4-fr-translation.plats-dauberges'); let rollList = []; await compendium.getIndex().then(index => rollList = index); //console.log("Got compendium...", rollList.length); @@ -20,9 +20,9 @@ const _manage_inn_roll = async (content, msg) => { if ( rollTab.name.toLowerCase().includes(command[1].toLowerCase()) ) { let my_rollTable; await compendium.getEntity(rollTab._id).then(mytab => my_rollTable = mytab); - var result = my_rollTable.roll(); - console.log("RES: ", result[0], result[1] ); - msg.content = my_rollTable.name + " : " + result[1].text; + let myroll = my_rollTable.roll(); + //console.log("RES: ", myroll ); + msg.content = my_rollTable.name + " : " + myroll.results[0].text; //my_rollTable.draw(); ChatMessage.create(msg); return false; diff --git a/module.json b/module.json index 0a59b7e..b9cca62 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "WH4-fr-translation", "title": "Traduction du module WH4 en Français.", "description": "La traduction du module WH4.", - "version": "0.71", + "version": "0.72", "minimumCoreVersion" : "0.5.6", "compatibleCoreVersion": "0.5.6", "author": "LeRatierBretonnien",