b52025ae72464ea944063110f99d05db2df3df97
Closes #1734 Summary: If you start a skill like fishing lobster after logging in, you will have the xpGained value as `90`. But, since you just started the skill, it will divide by `0`. This results in the max integer value of `2147483647`. If you did fletching before fishing, and had a XP per hour of `40000`. Then when you add the fishing XP per hour of `2147483647`, the result overflows and you get a negative number as the total XP per hour. Solution: Don't divide by zero, instead suppose that the skill has been active for **at least** 60 seconds. This will result in a fair estimate that improves as the skill continues to be used, rather than the ridiculous estimate of 2 Billion one second and 200K the next second. 60 seconds is chosen over 1 or 5 or 10 seconds as the result is more conservative and closer matches my hourly XP experiences.
runelite

runelite is a RuneScape 2 client and reverse engineering project
If you have any questions, please join our IRC channel on irc.rizon.net #runelite or alternatively our Discord server.
Project Layout
- cache - Libraries used for reading/writing cache files, as well as the data in it
- deobfuscator - Contains bytecode deobfuscator, mapper for handling updates, and the injector
- http-api - API for api.runelite.net
- http-service - Service for api.runelite.net
- model-viewer - RS Model, NPC/Object, and terrain viewer
- runelite-api - RuneLite API, interfaces for accessing the client
- runelite-mixins - Mixins which are injected into the injected client's classes
- runescape-api - Mappings correspond to these interfaces, runelite-api is a subset of this
- runelite-client - Game client with plugins
- runescape-client-injector - Builds the injected client from the vanilla client and the mappings
- runescape-client - Decompiled RuneScape client, contains mappings
Usage
Open the project in your IDE as a Maven project, build the root module and then run the RuneLite class in runelite-client.
For more information visit the RuneLite Wiki.
License
Most of RuneLite is licensed under the BSD 2-clause license. See the license header in the respective file to be sure. Some of the code, like everything in runescape-client, is automatically generated and is not licensed.
Contribute and Develop
We've set up a separate document for our contribution guidelines.
Description
Languages
Java
98.9%
GLSL
0.7%
C
0.3%
