Fix compétences créatures

Ne pas ajouter toutes les compétences à une nouvelle créature,
il faut presque toutes les enlever
This commit is contained in:
Vincent Vandemeulebrouck 2022-07-17 01:54:01 +02:00
parent 14eb655382
commit c3c42bdb21

View File

@ -115,11 +115,14 @@ export class RdDActor extends Actor {
return actor; return actor;
} }
const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type));
actorData.items = competences.map(i => i.toObject());
if (isPersonnage) { if (isPersonnage) {
const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type));
actorData.items = competences.map(i => i.toObject());
actorData.items = actorData.items.concat(Monnaie.monnaiesData()); actorData.items = actorData.items.concat(Monnaie.monnaiesData());
} }
else {
actorData.items = [];
}
return super.create(actorData, options); return super.create(actorData, options);
} }