Add files via upload
parent
9b5613e43c
commit
f0a5c5932b
|
@ -117,7 +117,7 @@ class SpellBrowser extends Application {
|
||||||
|
|
||||||
// getting damage types
|
// getting damage types
|
||||||
spell.damageTypes = [];
|
spell.damageTypes = [];
|
||||||
if (spell.data.damage.parts.length > 0) {
|
if (spell.data.damage && spell.data.damage.parts.length > 0) {
|
||||||
for (let part of spell.data.damage.parts) {
|
for (let part of spell.data.damage.parts) {
|
||||||
let type = part[1];
|
let type = part[1];
|
||||||
if (spell.damageTypes.indexOf(type) === -1) {
|
if (spell.damageTypes.indexOf(type) === -1) {
|
||||||
|
@ -180,7 +180,7 @@ class SpellBrowser extends Application {
|
||||||
if (item.type == 'spell') {
|
if (item.type == 'spell') {
|
||||||
npc.hasSpells = true;
|
npc.hasSpells = true;
|
||||||
}
|
}
|
||||||
if (item.data.damage.parts.length > 0) {
|
if (item.data.damage && item.data.damage.parts.length > 0) {
|
||||||
for (let part of item.data.damage.parts) {
|
for (let part of item.data.damage.parts) {
|
||||||
let type = part[1];
|
let type = part[1];
|
||||||
if (npc.damageDealt.indexOf(type) === -1) {
|
if (npc.damageDealt.indexOf(type) === -1) {
|
||||||
|
@ -564,9 +564,11 @@ class SpellBrowser extends Application {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (typeof prop === 'object') {
|
if (typeof prop === 'object') {
|
||||||
if (filter.value && prop.indexOf(filter.value) === -1) {
|
if (filter.value) {
|
||||||
|
if (prop.indexOf(filter.value) === -1) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
}
|
||||||
|
} else if(filter.values) {
|
||||||
for (let val of filter.values) {
|
for (let val of filter.values) {
|
||||||
if (prop.indexOf(val) !== -1) {
|
if (prop.indexOf(val) !== -1) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "compendium-browser",
|
"name": "compendium-browser",
|
||||||
"title": "Compendium Browser",
|
"title": "Compendium Browser",
|
||||||
"description": "A module to easily browse and filter spells as well as npcs loaded from compendie.",
|
"description": "A module to easily browse and filter spells as well as npcs loaded from compendie.",
|
||||||
"version": "0.1",
|
"version": "0.1.1",
|
||||||
"author": "Felix#6196",
|
"author": "Felix#6196",
|
||||||
"systems": ["dnd5e"],
|
"systems": ["dnd5e"],
|
||||||
"scripts": ["./compendium-browser.js"],
|
"scripts": ["./compendium-browser.js"],
|
||||||
|
|
Loading…
Reference in New Issue