mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Fixed old messages being instantiated with damage rolls as class=roll instead of the new class=baseRoll
This commit is contained in:
parent
b7e92cfe0e
commit
b2bf102443
2 changed files with 3 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ import TokenManager from './module/documents/tokenManager.mjs';
|
||||||
CONFIG.DH = SYSTEM;
|
CONFIG.DH = SYSTEM;
|
||||||
CONFIG.TextEditor.enrichers.push(...enricherConfig);
|
CONFIG.TextEditor.enrichers.push(...enricherConfig);
|
||||||
|
|
||||||
CONFIG.Dice.rolls = [Roll = BaseRoll, DHRoll, DualityRoll, D20Roll, DamageRoll, FateRoll];
|
CONFIG.Dice.rolls = [BaseRoll, Roll, DHRoll, DualityRoll, D20Roll, DamageRoll, FateRoll];
|
||||||
CONFIG.Dice.daggerheart = {
|
CONFIG.Dice.daggerheart = {
|
||||||
DHRoll: DHRoll,
|
DHRoll: DHRoll,
|
||||||
DualityRoll: DualityRoll,
|
DualityRoll: DualityRoll,
|
||||||
|
|
|
||||||
|
|
@ -192,12 +192,13 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
if (!main && !resources) {
|
if (!main && !resources) {
|
||||||
source.damage.main = null;
|
source.damage.main = null;
|
||||||
source.damage.resources = {};
|
source.damage.resources = {};
|
||||||
|
|
||||||
const getRoll = key => {
|
const getRoll = key => {
|
||||||
const damageData = source.damage[key];
|
const damageData = source.damage[key];
|
||||||
const oldRoll = damageData.parts[0]?.roll;
|
const oldRoll = damageData.parts[0]?.roll;
|
||||||
return oldRoll ? JSON.stringify({
|
return oldRoll ? JSON.stringify({
|
||||||
...oldRoll,
|
...oldRoll,
|
||||||
|
class: 'BaseRoll',
|
||||||
options: {
|
options: {
|
||||||
...oldRoll.options,
|
...oldRoll.options,
|
||||||
damageTypes: damageData.parts[0].damageTypes ?? []
|
damageTypes: damageData.parts[0].damageTypes ?? []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue