fix: NPC sheet not being able to fetch roll data
This commit is contained in:
@ -40,8 +40,6 @@ async getData()
|
||||
|
||||
// Add roll data for TinyMCE editors.
|
||||
context.rollData = context.actor.getRollData();
|
||||
// Add roll data for TinyMCE editors.
|
||||
context.rollData = context.actor.getRollData();
|
||||
|
||||
|
||||
console.log(context);
|
||||
@ -87,7 +85,16 @@ async getData()
|
||||
if (dataset.roll) {
|
||||
let label = dataset.label ? `${dataset.label}` : '';
|
||||
// Get the roll data and include wand bonuses
|
||||
let rollData = this.actor.getRollData();
|
||||
|
||||
let rollData;
|
||||
if(this.actor.type == "character") {
|
||||
rollData = this.actor.getRollDataPC();
|
||||
} else if (this.actor.type == "npc") {
|
||||
rollData = this.actor.getRollDataNPC();
|
||||
} else {
|
||||
console.log("ERROR: UNKNOWN AUTHOR TYPE");
|
||||
return;
|
||||
}
|
||||
let totalBonus = 0;
|
||||
console.log(dataset.roll);
|
||||
// Apply wood bonus if it matches the stat being rolled for
|
||||
|
Reference in New Issue
Block a user