Merge pull request #18 from xivapi/feex/ilvl-math

Fix ilvl calculation
This commit is contained in:
ArcaneDisgea 2021-06-07 09:20:52 -04:00 committed by GitHub
commit e75d26259a
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) {