Simplification des recherches
+ fix: ne pas chercher les compétences ailleurs que dans les compétences
This commit is contained in:
parent
5fa703241a
commit
bc32cd1ad4
@ -672,23 +672,13 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSortList( ) {
|
getSortList() {
|
||||||
let sortList = []
|
return this.data.items.filter(item => item.type == "sort");
|
||||||
for (const item of this.data.items) {
|
|
||||||
if (item.type == "sort" )
|
|
||||||
sortList.push(item);
|
|
||||||
}
|
|
||||||
return sortList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getDraconicList( ) {
|
getDraconicList() {
|
||||||
let draconicList = []
|
return this.data.items.filter(item => item.data.categorie == 'draconic')
|
||||||
for (const item of this.data.items) {
|
|
||||||
if (item.type == "competence" && item.data.categorie == 'draconic' )
|
|
||||||
draconicList.push(item);
|
|
||||||
}
|
|
||||||
return draconicList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -411,12 +411,7 @@ export class RdDUtility {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static findCompetence(compList, compName)
|
static findCompetence(compList, compName)
|
||||||
{
|
{
|
||||||
for (const item of compList) {
|
return compList.find(item => item.name == compName && (item.type =="competence" || item.type =="competencecreature"))
|
||||||
if (item.name == compName) {
|
|
||||||
//console.log("Found item !", item);
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user