Amélioration chat-message

- utilisation de partial template
- fixes mineurs (this sur static)
- singulier/pluriel pour points de rêve/points de tâche
This commit is contained in:
Vincent Vandemeulebrouck
2021-01-02 14:10:43 +01:00
parent f2aff6b234
commit d6c65ee3a5
17 changed files with 87 additions and 221 deletions

View File

@ -102,8 +102,9 @@ export class RdDResolutionTable {
static async displayRollData(rollData, userName, template = 'chat-resultat-general.html') {
let html = await RdDResolutionTable.buildRollDataHtml(rollData, template);
ChatUtility.chatWithRollMode({ content: html }, userName)
ChatUtility.chatWithRollMode(
{ content: await RdDResolutionTable.buildRollDataHtml(rollData, template) },
userName)
}
static _buildAjustements(rollData) {
@ -218,7 +219,7 @@ export class RdDResolutionTable {
if (difficulte < -10) {
return duplicate(levelDown.find(levelData => levelData.level == difficulte));
}
return duplicate(this.resolutionTable[caracValue][difficulte + 10]);
return duplicate(RdDResolutionTable.resolutionTable[caracValue][difficulte + 10]);
}
static isAjustementAstrologique(rollData) {
@ -342,10 +343,10 @@ export class RdDResolutionTable {
maxLevel = Math.max(Math.min(maxLevel, 22), minLevel + countColonnes);
let table = $("<table class='table-resolution'/>")
.append(this._buildHTMLHeader(this.resolutionTable[0], minLevel, maxLevel));
.append(this._buildHTMLHeader(RdDResolutionTable.resolutionTable[0], minLevel, maxLevel));
for (var rowIndex = minCarac; rowIndex <= maxCarac; rowIndex++) {
table.append(this._buildHTMLRow(this.resolutionTable[rowIndex], rowIndex, caracValue, levelValue, minLevel, maxLevel));
table.append(this._buildHTMLRow(RdDResolutionTable.resolutionTable[rowIndex], rowIndex, caracValue, levelValue, minLevel, maxLevel));
}
table.append("</table>");
return table;