From 12111012658f1793e50d02ed1abf27303833bc66 Mon Sep 17 00:00:00 2001 From: bibekaur Date: Wed, 2 Dec 2015 20:45:45 -0800 Subject: [PATCH] Revert "Fix issue #2464" This reverts commit d19b682a556e8047ec4058c09a194a9adbbe9d5f. --- .../config/experience/ExperienceConfig.java | 3 +-- .../nossr50/datatypes/player/PlayerProfile.java | 2 +- src/main/resources/experience.yml | 16 +--------------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java index 72d00dd11..0062d7b7f 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -165,8 +165,7 @@ public class ExperienceConfig extends AutoUpdateConfigLoader { */ /* Curve settings */ - 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 FormulaType getFormulaType() { return FormulaType.getFormulaType(config.getString("Experience_Formula.Curve")); } public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience_Formula.Cumulative_Curve", false); } /* Curve values */ diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index f2ed6fd2f..b55cfd98b 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -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(skillType); + FormulaType formulaType = ExperienceConfig.getInstance().getFormulaType(); return mcMMO.getFormulaManager().getCachedXpToLevel(level, formulaType); } diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index 2cb32528d..5d53711e0 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -14,21 +14,7 @@ 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: - Swords: LINEAR - Taming: LINEAR - Acrobatics: LINEAR - Excavation: LINEAR - Herbalism: LINEAR - Unarmed: LINEAR - Woodcutting: LINEAR - Mining: LINEAR - Archery: LINEAR - Axes: LINEAR - Repair: LINEAR - Fishing: LINEAR - Alchemy: LINEAR - DEFAULT: LINEAR + Curve: LINEAR # If invalid values are entered mcMMO will not start and print an error in the console Linear_Values: