Grover-c13 / PokeGOAPI-Java

Pokemon Go API
GNU General Public License v3.0
1.05k stars 334 forks source link

#908 Fix: InsufficientLevelException #911

Closed hrk closed 7 years ago

hrk commented 7 years ago

The proposed fix makes a private method w/ a boolean to determine if the consistency check for level has to be performed. The public acceptLevelUpRewards() calls it w/ checkLevel=true. The setStats() method used the private one w/ checkLevel=false. This keeps the logic of setStats unaltered (as I didn't know the reasoning behind it).

Fixed issue: [Reference the issue number here, or remove if not a fix]

908

Changes made: A new private method w/ boolean parameter to determine if the level check has to be done.