distinction changement d'xp vs gain d'xp
This commit is contained in:
parent
458e7ddb9f
commit
0791fc75fa
@ -840,7 +840,7 @@ export class RdDActor extends Actor {
|
|||||||
this.checkCompetenceXP(compName, newXp);
|
this.checkCompetenceXP(compName, newXp);
|
||||||
const update = { _id: comp.id, 'data.xp': newXp };
|
const update = { _id: comp.id, 'data.xp': newXp };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
this.updateExperienceLog("XP", newXp, "XP en " + compName);
|
this.updateExperienceLog("XP", newXp, "XP modifié en " + compName);
|
||||||
} else {
|
} else {
|
||||||
console.log("Competence not found", compName);
|
console.log("Competence not found", compName);
|
||||||
}
|
}
|
||||||
@ -854,7 +854,7 @@ export class RdDActor extends Actor {
|
|||||||
compValue = compValue ?? 0;
|
compValue = compValue ?? 0;
|
||||||
const update = { _id: comp.id, 'data.xp_sort': compValue };
|
const update = { _id: comp.id, 'data.xp_sort': compValue };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
this.updateExperienceLog("XP Sort", compValue, "XP en sort de " + compName);
|
this.updateExperienceLog("XP Sort", compValue, "XP modifié en sort de " + compName);
|
||||||
} else {
|
} else {
|
||||||
console.log("Competence not found", compName);
|
console.log("Competence not found", compName);
|
||||||
}
|
}
|
||||||
@ -2822,7 +2822,7 @@ export class RdDActor extends Actor {
|
|||||||
let update = { _id: xpData.competence._id, 'data.xp': newXp };
|
let update = { _id: xpData.competence._id, 'data.xp': newXp };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]);
|
await this.updateEmbeddedDocuments('Item', [update]);
|
||||||
xpData.checkComp = await this.checkCompetenceXP(xpData.competence.name, undefined, false);
|
xpData.checkComp = await this.checkCompetenceXP(xpData.competence.name, undefined, false);
|
||||||
this.updateExperienceLog("XP", xpData.xp, "XP en " + xpData.competence.name);
|
this.updateExperienceLog("XP", xpData.xp, "XP gagné en " + xpData.competence.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2835,7 +2835,7 @@ export class RdDActor extends Actor {
|
|||||||
selectedCarac.xp = Misc.toInt(selectedCarac.xp) + xpData.xpCarac;
|
selectedCarac.xp = Misc.toInt(selectedCarac.xp) + xpData.xpCarac;
|
||||||
await this.update({ "data.carac": carac });
|
await this.update({ "data.carac": carac });
|
||||||
xpData.checkCarac = await this.checkCaracXP(selectedCarac.label, false);
|
xpData.checkCarac = await this.checkCaracXP(selectedCarac.label, false);
|
||||||
this.updateExperienceLog("XP", xpData.xpCarac, "XP en " + xpData.caracName);
|
this.updateExperienceLog("XP", xpData.xpCarac, "XP gagné en " + xpData.caracName);
|
||||||
} else {
|
} else {
|
||||||
xpData.caracRepartitionManuelle = true;
|
xpData.caracRepartitionManuelle = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user