michaelbull / rs-api

An open-source implementation of a web-service client, written in Java, that allows interaction with the various APIs available for the popular MMORPG; RuneScape.
ISC License
34 stars 12 forks source link

Player Information throws exception if skill is locked #4

Closed jsnells1 closed 6 years ago

jsnells1 commented 6 years ago

When trying to get player information from Hiscores, if a skill is locked like Invention, the level is 0 instead of 1. This throws an exception when I assume it shouldn't.

michaelbull commented 6 years ago

Ah, think this will be a case of changing this line. If you want to open a PR to change it that'd be appreciated, if not I can address this soon.

jsnells1 commented 6 years ago

I'll try to get around to it. I just found the api and am getting used to it. It'll be a couple changes to convert the level from 0 to 1 and the experience from -1 to 0 but it looks like it can all be done in that constructor.

EDIT: Nevermind, I see you check for experience. Would you want the level to stay as 0?