Simplification des recherches

+ fix: ne pas chercher les compétences ailleurs
que dans les compétences
This commit is contained in:
2020-11-12 18:41:43 +01:00
parent 5fa703241a
commit bc32cd1ad4
2 changed files with 7 additions and 22 deletions

View File

@ -411,12 +411,7 @@ export class RdDUtility {
/* -------------------------------------------- */
static findCompetence(compList, compName)
{
for (const item of compList) {
if (item.name == compName) {
//console.log("Found item !", item);
return item;
}
}
return compList.find(item => item.name == compName && (item.type =="competence" || item.type =="competencecreature"))
}
/* -------------------------------------------- */