Class ExperienceTable
java.lang.Object
com.realtime.crossfire.jxclient.stats.ExperienceTable
Stores experience <-> level mappings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetExperienceToNextLevel(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.
-
Constructor Details
-
ExperienceTable
public ExperienceTable()
-
-
Method Details
-
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
-