diff --git a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java index d2dc1ec5..5a2365ac 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java @@ -457,7 +457,7 @@ public class JobsCommands implements CommandExecutor { */ public String jobStatsMessageArchive(JobsPlayer jPlayer, JobProgression jobProg) { int level = jPlayer.getLevelAfterRejoin(jobProg); - int exp = jPlayer.getExpAfterRejoin(jobProg, jPlayer.getLevelAfterRejoin(jobProg)); + double exp = jPlayer.getExpAfterRejoin(jobProg, jPlayer.getLevelAfterRejoin(jobProg)); String message = Jobs.getLanguage().getMessage("command.stats.output", "%joblevel%", level, "%jobname%", jobProg.getJob().getChatColor() + jobProg.getJob().getName(), diff --git a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java index fe3e25de..b4e4909e 100644 --- a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java @@ -440,7 +440,7 @@ public class JobsPlayer { // synchronized (saveLock) { if (!isInJob(job)) { int level = 1; - int exp = 0; + double exp = 0; JobProgression archived = getArchivedJobProgression(job); if (archived != null) { @@ -486,9 +486,10 @@ public class JobsPlayer { return level; } - public int getExpAfterRejoin(JobProgression jp, int level) { + public double getExpAfterRejoin(JobProgression jp, int level) { if (jp == null) return 1; + Integer max = jp.getMaxExperience(level); Double exp = jp.getExperience(); if (exp > max) @@ -503,7 +504,8 @@ public class JobsPlayer { } else exp = (exp - (exp * (Jobs.getGCManager().levelLossPercentage / 100.0))); } - return exp.intValue(); + + return exp.doubleValue(); } /** diff --git a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java index 0e7daf00..6915c913 100644 --- a/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java +++ b/src/main/java/com/gamingmesh/jobs/dao/JobsDAO.java @@ -148,7 +148,7 @@ public abstract class JobsDAO { public enum JobsTableFields implements JobsTableInterface { userid("int"), job("text"), - experience("int"), + experience("double"), level("int"), jobid("int");