`;
}
-
-
+ let $stat = $(statblockData); //spell tooltip data is incorrect in 2024 monsters - grab from monster page until fixed in monster api for encounter tool/MAPS
+ $stat.find('.spell-tooltip').each((index, tooltip) =>{
+ $(tooltip).attr('data-tooltip-href', $(statBlock.data.spellTooltips[index]).attr('data-tooltip-href'))
+ $(tooltip).attr('href', $(statBlock.data.spellTooltips[index]).attr('href'))
+ })
+ return $stat[0].outerHTML;
}
function build_monster_copy_stat_block(statBlock) {
if (!statBlock.userHasAccess) {
return `
You do not have access to this content on DndBeyond.
`;
}
+ let statblockData = '';
if(get_avtt_setting_value('statBlockStyle') == 0 && statBlock.data.initiativeMod != undefined || get_avtt_setting_value('statBlockStyle') == 2){
- return `
+ statblockData = `
@@ -1032,7 +1037,7 @@ function build_monster_copy_stat_block(statBlock) {
`
}
else{
- return `
+ statblockData = `
@@ -1286,6 +1291,13 @@ function build_monster_copy_stat_block(statBlock) {
`;
}
+
+ let $stat = $(statblockData); //spell tooltip data is incorrect in 2024 monsters - grab from monster page until fixed in monster api for encounter tool/MAPS
+ $stat.find('.spell-tooltip').each((index, tooltip) =>{
+ $(tooltip).attr('data-tooltip-href', $(statBlock.data.spellTooltips[index]).attr('data-tooltip-href'))
+ $(tooltip).attr('href', $(statBlock.data.spellTooltips[index]).attr('href'))
+ })
+ return $stat[0].outerHTML;
}
class MonsterStatBlock {
constructor(data) {