Skip to content

Commit

Permalink
revert fix of suspicious int casting in getTotalxp()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathing committed Dec 14, 2024
1 parent 395027f commit d703dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/lyof/sortilege/utils/XPHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static int getTotalxp(int level, float progress, ServerLevel server) {

if (totalxpCache.containsKey(level)) {
dummy.experienceLevel = level;
return (int) (totalxpCache.get(level) + dummy.getXpNeededForNextLevel() * progress);
total += dummy.getXpNeededForNextLevel() * (i == level ? progress : 1);
}

for (int i = 0; i <= level; i++) {
Expand Down

0 comments on commit d703dda

Please sign in to comment.