From 7b9332bac9ed479958608f9781c24aac07400812 Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Sun, 16 Feb 2025 11:35:45 -0500 Subject: [PATCH] Fix - grab spell tooltip data from monster page since it's incorrect in encounter tool/MAPS --- EncounterHandler.js | 2 ++ MonsterStatBlock.js | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/EncounterHandler.js b/EncounterHandler.js index fa9932d0c..d60de0082 100644 --- a/EncounterHandler.js +++ b/EncounterHandler.js @@ -106,6 +106,8 @@ async function fetch_monsters(monsterIds, callback, open5e=false) { monsterData[i].treasure = treasure; monsterData[i].gear = gear; } + let spellTooltips = $(moreInfo)?.find('[class*="mon-stat-block-2024"] .spell-tooltip') + monsterData[i].spellTooltips = spellTooltips; resolve(); })) diff --git a/MonsterStatBlock.js b/MonsterStatBlock.js index ef47496c0..9fad42772 100644 --- a/MonsterStatBlock.js +++ b/MonsterStatBlock.js @@ -182,9 +182,9 @@ function build_monster_stat_block(statBlock, token) { if (!statBlock.userHasAccess) { return `