Stabilisation fix 1.2 #332

Merged
vincent.vandeme merged 1 commits from stabilisation-fix-1.2 into v1.2 2021-01-14 07:31:21 +01:00
2 changed files with 14 additions and 9 deletions
Showing only changes of commit 039cb8ab71 - Show all commits

View File

@ -278,15 +278,21 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */
_getTitle(rollData) {
if (rollData.competence) {
const carac = rollData.selectedCarac.label;
if (!rollData.competence) {
return carac;
}
const compName = rollData.competence.name;
if (rollData.draconicList && rollData.selectedSort) {
return compName + " - " + rollData.selectedSort.name;
}
// If a weapon is there, add it in the title
let armeTitle = (rollData.arme) ? " (" + rollData.arme.name + ") " : "";
let niveau = Misc.toSignedString(rollData.competence.data.niveau);
return rollData.selectedCarac.label + "/" + rollData.competence.name + armeTitle + " " + niveau
const niveau = Misc.toSignedString(rollData.competence.data.niveau);
if (compName == carac) {
// cas des créatures
return carac + " " + niveau
}
if (rollData.draconicList) {
return rollData.competence.name + " - " + rollData.selectedSort.name;
}
return rollData.selectedCarac.label;
const armeTitle = (rollData.arme) ? " (" + rollData.arme.name + ") " : "";
return carac + "/" + compName + armeTitle + " " + niveau
}
}

View File

@ -1,4 +1,3 @@
{{log "handlebar dialog-competence" this}}
<form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2>
<div class="form-group">