v12 fixes : Fix rolls
This commit is contained in:
@@ -145,7 +145,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the roll
|
// Get the roll
|
||||||
this.roll = game.l5r5e.RollL5r5e.fromData(this.messageRoll);
|
this.roll = this.messageRoll;
|
||||||
|
|
||||||
// Already history
|
// Already history
|
||||||
if (Array.isArray(this.roll.l5r5e.history)) {
|
if (Array.isArray(this.roll.l5r5e.history)) {
|
||||||
|
|||||||
@@ -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.
|
* This function can either create the ChatMessage directly, or return the data object that will be used to create.
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
async toMessage(messageData = {}, { rollMode = null, create = true } = {}) {
|
async toMessage(messageData = {}, { rollMode = null } = {}) {
|
||||||
// Perform the roll, if it has not yet been rolled
|
// Perform the roll, if it has not yet been rolled
|
||||||
if (!this._evaluated) {
|
if (!this._evaluated) {
|
||||||
await this.evaluate();
|
await this.evaluate();
|
||||||
@@ -356,12 +356,11 @@ export class RollL5r5e extends Roll {
|
|||||||
},
|
},
|
||||||
messageData
|
messageData
|
||||||
);
|
);
|
||||||
messageData.roll = this;
|
messageData.rolls = [this];
|
||||||
|
|
||||||
// Either create the message or just return the chat data
|
// Either create the message or just return the chat data
|
||||||
return ChatMessage.implementation.create(messageData, {
|
return ChatMessage.implementation.create(messageData, {
|
||||||
rollMode: rMode,
|
rollMode: rMode,
|
||||||
temporary: !create,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user