rollCaracCompetence avec dialog
This commit is contained in:
		| @@ -2413,6 +2413,24 @@ export class RdDActor extends RdDBaseActor { | ||||
|     if (tache) { | ||||
|       await this.createEmbeddedDocuments('Item', [tache], { renderSheet: false }); | ||||
|     } | ||||
|  | ||||
|   async rollCaracCompetence(caracName, compName, diff, options = { title: "" }) { | ||||
|     const competence = this.getCompetence(compName); | ||||
|     await this._openRollDialog({ | ||||
|       name: 'jet-competence', | ||||
|       label: 'Jet ' + Grammar.apostrophe('de', competence.name), | ||||
|       template: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html', | ||||
|       rollData: { | ||||
|         alias: this.name, | ||||
|         carac: this.system.carac, | ||||
|         selectedCarac: this.getCaracByName(caracName), | ||||
|         selectedCaracName: caracName, | ||||
|         diffLibre: diff, | ||||
|         competence: competence, | ||||
|         show: { title: options?.title ?? '' } | ||||
|       }, | ||||
|       callbackAction: r => this.$onRollCompetence(r) | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user