searching of talents aborted prematurely.
This commit is contained in:
@ -24,7 +24,9 @@ module.exports = async (message, args, db) => {
|
||||
// try to get id of short formatted attributes.
|
||||
if (args[0].length == 2) {
|
||||
for (const i in globals.Werte) {
|
||||
if (globals.Werte[i].kuerzel == args[0].toUpperCase()) attributename = globals.Werte[i].id;
|
||||
if (globals.Werte[i].kuerzel == args[0].toUpperCase()) {
|
||||
attributename = globals.Werte[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -15,18 +15,16 @@ module.exports = async (message, args, db) => {
|
||||
}
|
||||
const values = [];
|
||||
const roll = [];
|
||||
let found = false;
|
||||
let talent
|
||||
let bonus = 0;
|
||||
let ok = 0;
|
||||
let patzer = 0;
|
||||
let crit = 0;
|
||||
|
||||
for (i in docs[0].character.skills) {
|
||||
if (docs[0].character.skills[i].id == args[0]) {bonus = docs[0].character.skills[i].level; found = true;}
|
||||
}
|
||||
if (!found) {
|
||||
message.reply('Sorry, das Talent ist mir unbekannt.');
|
||||
return;
|
||||
if (docs[0].character.skills[i].id == talent) {bonus = docs[0].character.skills[i].level;}
|
||||
}
|
||||
|
||||
const bonus_orig = bonus;
|
||||
const result = globals.Talente.find(talent => talent.id === args[0]);
|
||||
|
||||
|
Reference in New Issue
Block a user