v12 fixes : Fix rolls

This commit is contained in:
Vlyan
2024-05-24 15:21:12 +02:00
parent bff5ed7865
commit fcc2691f4b
2 changed files with 3 additions and 4 deletions

View File

@@ -145,7 +145,7 @@ export class RollnKeepDialog extends FormApplication {
}
// Get the roll
this.roll = game.l5r5e.RollL5r5e.fromData(this.messageRoll);
this.roll = this.messageRoll;
// Already history
if (Array.isArray(this.roll.l5r5e.history)) {

View File

@@ -327,7 +327,7 @@ export class RollL5r5e extends Roll {
* This function can either create the ChatMessage directly, or return the data object that will be used to create.
* @override
*/
async toMessage(messageData = {}, { rollMode = null, create = true } = {}) {
async toMessage(messageData = {}, { rollMode = null } = {}) {
// Perform the roll, if it has not yet been rolled
if (!this._evaluated) {
await this.evaluate();
@@ -356,12 +356,11 @@ export class RollL5r5e extends Roll {
},
messageData
);
messageData.roll = this;
messageData.rolls = [this];
// Either create the message or just return the chat data
return ChatMessage.implementation.create(messageData, {
rollMode: rMode,
temporary: !create,
});
}