Merge pull request #5 from SexyBears/patch-1

Fixed getLevel
This commit is contained in:
Jeroen Ketelaar
2014-05-31 15:10:05 +02:00
+17 -1
View File
@@ -67,8 +67,12 @@ public enum Skill {
return Skill.getRealLevel(this.getIndex());
}
/**
* Returns the current level. (For example, if you've been de-buffed by a spell, or drank a beer that buffs the stat; it will return the buffed level.)
* Done by Bears
*/
public final int getLevel() {
return Skill.getRealLevel(this.getIndex());
return Skill.getCurrentLevel(this.getIndex());
}
/**
@@ -115,6 +119,18 @@ public enum Skill {
public static final int getRealLevel(int index) {
return getLevelByExperience(getCurrentExperience(index));
}
/**
* Returns the current level of the provided skill. (Will return de-buffed/buffed levels)
*
* @param index
* the skill index.
* @return the current skill level.
* Done by Bears
*/
public static final int getCurrentLevel(int index) {
return Loader.getClient().getCurrentStats()[index];
}
/**
* Returns the exact experience at the provided level.