Some checks on 20Q

Fix a bug with babele on drop a compendium in 20q
This commit is contained in:
Vlyan
2020-12-30 16:12:45 +01:00
parent 7cab7de52b
commit 2074caa125
10 changed files with 101 additions and 59 deletions

View File

@@ -97,6 +97,12 @@ export class HelpersL5r5e {
// Unknown pack object, iterate all packs
for (const comp of game.packs) {
// TODO Bug with babele if "comp.getEntity(id)" return null...
const babeleFix = (await comp.getIndex()).some((e) => e._id === id);
if (!babeleFix) {
continue;
}
const data = await comp.getEntity(id);
if (data) {
return HelpersL5r5e.createItemFromCompendium(data);