Fix for issue #2464

This commit is contained in:
bibekaur 2015-12-02 20:53:40 -08:00
parent 9718123292
commit a67965ebcb
3 changed files with 18 additions and 3 deletions

View File

@ -165,7 +165,8 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
*/
/* Curve settings */
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); }
public FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve.DEFAULT")); }
public FormulaType getFormulaType(SkillType skill) { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve." + StringUtils.getCapitalized(skill.toString()))); }
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); }
/* Curve values */

View File

@ -345,7 +345,7 @@ public class PlayerProfile {
*/
public int getXpToLevel(SkillType skillType) {
int level = (ExperienceConfig.getInstance().getCumulativeCurveEnabled()) ? UserManager.getPlayer(playerName).getPowerLevel() : skills.get(skillType);
FormulaType formulaType = ExperienceConfig.getInstance().getFormulaType();
FormulaType formulaType = ExperienceConfig.getInstance().getFormulaType(skillType);
return mcMMO.getFormulaManager().getCachedXpToLevel(level, formulaType);
}

View File

@ -14,7 +14,21 @@ Experience_Formula:
# If an invalid value is entered, this will reset to the default setting, which is LINEAR
# LINEAR: base + (level * multiplier)
# EXPONENTIAL: multiplier * level ^ exponent + base
Curve: LINEAR
Curve:
Swords: LINEAR
Taming: EXPONENTIAL
Acrobatics: LINEAR
Excavation: EXPONENTIAL
Herbalism: LINEAR
Unarmed: EXPONENTIAL
Woodcutting: LINEAR
Mining: EXPONENTIAL
Archery: LINEAR
Axes: EXPONENTIAL
Repair: LINEAR
Fishing: EXPONENTIAL
Alchemy: LINEAR
DEFAULT: LINEAR
# If invalid values are entered mcMMO will not start and print an error in the console
Linear_Values: