1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-14 10:34:41 +02:00

Should fix some exp math issues

This commit is contained in:
snowleo
2012-04-09 17:52:46 +03:00
parent 12840a68cb
commit a3b8c3d94d

View File

@@ -53,7 +53,7 @@ public class SetExpFix
//Without this people would be able to use exp and then still sell it. //Without this people would be able to use exp and then still sell it.
public static int getTotalExperience(final Player player) public static int getTotalExperience(final Player player)
{ {
int exp = (int) (getExpToLevel(player) * player.getExp()); int exp = (int)Math.round(getExpToLevel(player) * player.getExp());
int currentLevel = player.getLevel(); int currentLevel = player.getLevel();
while (currentLevel > 0) { while (currentLevel > 0) {