Class ExperienceTable
- java.lang.Object
-
- com.realtime.crossfire.jxclient.stats.ExperienceTable
-
public class ExperienceTable extends java.lang.ObjectStores experience <-> level mappings.
-
-
Constructor Summary
Constructors Constructor Description ExperienceTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetExperienceToNextLevel(int currentLevel, long currentExp)Returns the experience needed to reach the next level.intgetPercentsToNextLevel(int currentLevel, long currentExp)Returns the experience fraction of the current level in percents.voidsetExpTable(long @NotNull [] expTable)Updates the experience table information.
-
-
-
Method Detail
-
getExperienceToNextLevel
public long getExperienceToNextLevel(int currentLevel, long currentExp)Returns the experience needed to reach the next level.- Parameters:
currentLevel- the current levelcurrentExp- the current experience- Returns:
- the experience to reach level
currentLevel+1
-
getPercentsToNextLevel
public int getPercentsToNextLevel(int currentLevel, long currentExp)Returns the experience fraction of the current level in percents. The value starts at 0% when a new level has been gained; the next level is at 100%.- Parameters:
currentLevel- the current levelcurrentExp- the current experience- Returns:
- the experience fraction
-
setExpTable
public void setExpTable(long @NotNull [] expTable)
Updates the experience table information.- Parameters:
expTable- the new experience table
-
-