Workaround.. lazy to put req

This commit is contained in:
b 2021-06-18 23:44:59 -07:00
parent 24ff286964
commit d574d5dbf7

View file

@ -62,8 +62,13 @@ function clean_item(item) {
item.skillpoints = [item.str, item.dex, item.int, item.def, item.agi];
item.has_negstat = item.str < 0 || item.dex < 0 || item.int < 0 || item.def < 0 || item.agi < 0;
item.reqs = [item.strReq, item.dexReq, item.intReq, item.defReq, item.agiReq];
for (int i = 0; i < 5; ++i) {
if (item.reqs[i] === undefined) {
item.reqs[i] = 0;
}
}
if (item.slots === undefined) {
item.slots = 0
item.slots = 0;
}
}
}