From b3a1cd7e18405284f829e3ba66ec4688b7cfd10e Mon Sep 17 00:00:00 2001 From: Ay'yaruq Dotharl Date: Mon, 7 Jun 2021 14:11:21 +1000 Subject: [PATCH] Fix ilvl calculation Empty slots are not ignored for ilvl, the divisor is always fixed at 13. --- create-card.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/create-card.js b/create-card.js index 49de0c8..8217fb7 100644 --- a/create-card.js +++ b/create-card.js @@ -265,7 +265,10 @@ class CardCreator { if (cnt == 0) return 0; - return this.pad(Math.floor(ilvl / cnt), 4); + // ilvl division is always out of 13 items + // mainhand counts twice if there's no offhand + // job stones are ignored + return this.pad(Math.floor(ilvl / 13), 4); } pad(num, size) {