use of com.archyx.aureliumskills.rewards.RewardTable in project AureliumSkills by Archy-X.
the class PlayerData method getAbilityLevel.
public int getAbilityLevel(Ability ability) {
Skill skill = ability.getSkill();
RewardTable rewardTable = plugin.getRewardManager().getRewardTable(skill);
if (getSkillLevel(ability.getSkill()) < plugin.getAbilityManager().getUnlock(ability)) {
return 0;
}
int level = (getSkillLevel(ability.getSkill()) - plugin.getAbilityManager().getUnlock(ability)) / plugin.getAbilityManager().getLevelUp(ability) + 1;
// Check max level
if (level <= plugin.getAbilityManager().getMaxLevel(ability) || plugin.getAbilityManager().getMaxLevel(ability) == 0) {
return level;
} else {
return plugin.getAbilityManager().getMaxLevel(ability);
}
}
Aggregations