Fixed a bug introduced by DiceSoNice 4.2.1

This commit is contained in:
Vlyan
2021-10-11 18:17:09 +02:00
parent d41cfa99ef
commit fe5f9e4cf6
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
# Changelog # Changelog
## 1.3.5 - DsN hotfix
- Fixed a bug introduced by DiceSoNice 4.2.1 : context in "diceSoNiceRollStart" hook rebuild data and lost what we needed. The consequence is 3d dice flood a lot in RnK.
## 1.3.4 - Compendiums Update ## 1.3.4 - Compendiums Update
- Fixed a bug with sheet item drop introduced in previous version. - Fixed a bug with sheet item drop introduced in previous version.
- Added FoV English Opportunities usage. - Added FoV English Opportunities usage.

View File

@@ -259,7 +259,10 @@ export default class HooksL5r5e {
* @param {object} context * @param {object} context
*/ */
static diceSoNiceRollStart(messageId, context) { static diceSoNiceRollStart(messageId, context) {
if (context.roll.l5r5e?.history) { // In DsN 4.2.1+ the roll is altered in context.
// So we need to get the original message instead of "context.roll.l5r5e?.history"
const message = game.messages.get(messageId);
if (message?._roll?.l5r5e?.history) {
context.blind = true; context.blind = true;
} }
} }

View File

@@ -4,8 +4,8 @@
"description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by <a href='https://edge-studio.net/'>Edge Studio</a> <p> - Join the official Discord server: <a href='https://discord.gg/foundryvtt'> Official Discord</a></p><p> - Rejoignez la communauté Francophone: <a href='https://discord.gg/pPSDNJk'>Francophone Discord</a></p>", "description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by <a href='https://edge-studio.net/'>Edge Studio</a> <p> - Join the official Discord server: <a href='https://discord.gg/foundryvtt'> Official Discord</a></p><p> - Rejoignez la communauté Francophone: <a href='https://discord.gg/pPSDNJk'>Francophone Discord</a></p>",
"url": "https://gitlab.com/teaml5r/l5r5e", "url": "https://gitlab.com/teaml5r/l5r5e",
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.3.4/raw/l5r5e.zip?job=build", "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.3.5/raw/l5r5e.zip?job=build",
"version": "1.3.4", "version": "1.3.5",
"minimumCoreVersion": "0.8.5", "minimumCoreVersion": "0.8.5",
"compatibleCoreVersion": "0.8.9", "compatibleCoreVersion": "0.8.9",
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",