Fix ilvl calculation

Empty slots are not ignored for ilvl, the divisor is always fixed at 13.
This commit is contained in:
Ay'yaruq Dotharl 2021-06-07 14:11:21 +10:00 committed by GitHub
parent 418ae77035
commit b3a1cd7e18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {