From 5aed5629bf225684a0f993522669bf34964ea09a Mon Sep 17 00:00:00 2001 From: Vlyan Date: Tue, 29 Mar 2022 11:33:05 +0200 Subject: [PATCH] Fixed technique with a skill set, in a title, now open the DicePicker as intended. --- CHANGELOG.md | 4 ++++ system/scripts/actors/base-character-sheet.js | 6 +++--- system/system.json | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38d8f65..dd3df56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog Date format : day/month/year +## 1.7.1 - ??/04/2022 - Spring fixes +- PC/NPC sheet : + - Fixed technique with a skill set, in a title, now open the DicePicker as intended. + ## 1.7.0 - 28/03/2022 - Strife, DiceRoller for Techniques & Npc Generator - NPC Sheet : - Added a random generator feature (Demeanor, Clan and Families names courteously authorized by Edge). diff --git a/system/scripts/actors/base-character-sheet.js b/system/scripts/actors/base-character-sheet.js index daf03ce..c7ba925 100644 --- a/system/scripts/actors/base-character-sheet.js +++ b/system/scripts/actors/base-character-sheet.js @@ -613,12 +613,12 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e { * @param {Event} event * @private */ - _openDicePickerForTechnique(event) { + async _openDicePickerForTechnique(event) { event.preventDefault(); event.stopPropagation(); - const itemId = $(event.currentTarget).data("item-id") || null; - const item = this.actor.items.get(itemId); + // Required for tech in titles, search in sub items + const item = await game.l5r5e.HelpersL5r5e.getEmbedItemByEvent(event, this.actor); if (!item || item.type !== "technique" || !item.data.data.skill) { return; } diff --git a/system/system.json b/system/system.json index 4507f79..1abec6d 100644 --- a/system/system.json +++ b/system/system.json @@ -4,8 +4,8 @@ "description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by Edge Studio

- Join the official Discord server: Official Discord

- Rejoignez la communauté Francophone: Francophone Discord

", "url": "https://gitlab.com/teaml5r/l5r5e", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", - "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.7.0/raw/l5r5e.zip?job=build", - "version": "1.7.0", + "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.7.1/raw/l5r5e.zip?job=build", + "version": "1.7.1", "minimumCoreVersion": "9", "compatibleCoreVersion": "9", "manifestPlusVersion": "1.0.0",