Fix reférence circulaire
La méthode rollData fait le jet fourni dans rollData et l'ajoute dans rollData.rolled. Pas besoin de retourner rollData, la tentation est forte de mettre le résultat dans "rolled"
This commit is contained in:
parent
63e410458e
commit
df5954bf75
@ -142,7 +142,7 @@ export class RdDActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async performRoll(rollData, attacker = undefined) {
|
||||
// garder le résultat
|
||||
rollData.rolled = await RdDResolutionTable.rollData(rollData);
|
||||
await RdDResolutionTable.rollData(rollData);
|
||||
|
||||
//console.log("performRoll", rollData)
|
||||
if ( !rollData.attackerRoll) {// Store in the registry if not a defense roll
|
||||
|
@ -100,7 +100,6 @@ export class RdDResolutionTable {
|
||||
/* -------------------------------------------- */
|
||||
static async rollData(rollData ) {
|
||||
rollData.rolled = await this.roll(rollData.caracValue, rollData.finalLevel, rollData.bonus);
|
||||
return rollData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user