From d574d5dbf7af9280f3fed6340395caada4e5034c Mon Sep 17 00:00:00 2001 From: b Date: Fri, 18 Jun 2021 23:44:59 -0700 Subject: [PATCH] Workaround.. lazy to put req --- load3.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/load3.js b/load3.js index c39ad28..faac36c 100644 --- a/load3.js +++ b/load3.js @@ -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; } } }