Add files via upload

pre-0.4.4
Felix 2019-12-29 19:10:27 +01:00 committed by GitHub
parent 9b5613e43c
commit f0a5c5932b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -117,7 +117,7 @@ class SpellBrowser extends Application {
// getting damage types
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) {
let type = part[1];
if (spell.damageTypes.indexOf(type) === -1) {
@ -180,7 +180,7 @@ class SpellBrowser extends Application {
if (item.type == 'spell') {
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) {
let type = part[1];
if (npc.damageDealt.indexOf(type) === -1) {
@ -564,9 +564,11 @@ class SpellBrowser extends Application {
}
} else {
if (typeof prop === 'object') {
if (filter.value && prop.indexOf(filter.value) === -1) {
if (filter.value) {
if (prop.indexOf(filter.value) === -1) {
return false;
} else {
}
} else if(filter.values) {
for (let val of filter.values) {
if (prop.indexOf(val) !== -1) {
continue;

View File

@ -2,7 +2,7 @@
"name": "compendium-browser",
"title": "Compendium Browser",
"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",
"systems": ["dnd5e"],
"scripts": ["./compendium-browser.js"],