Fixed a bug where RetroMode would always use Linear formula

This commit is contained in:
nossr50 2019-05-27 20:13:22 -07:00
parent 11f669f8f4
commit 54eca5b8ba
3 changed files with 5 additions and 6 deletions

View File

@ -1,3 +1,6 @@
Version 2.1.65
Corrected a bug that would cause RetroMode to use Linear formula regardless of setting
Version 2.1.64
Corrected how Standard mode (1-100 scaling) XP to next level was calculated, it is now a true 1:10 ratio with Retro (1-1000) scale, which is how it was intended to be to begin with
Fixed a bug that caused skill messages to spam nearby players

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.64</version>
<version>2.1.65</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

View File

@ -22,12 +22,8 @@ public class FormulaManager {
private FormulaType previousFormula;
//Used for XP formula scaling
private boolean retroModeEnabled;
public FormulaManager() {
/* Setting for Classic Mode (Scales a lot of stuff up by * 10) */
retroModeEnabled = Config.getInstance().getIsRetroMode();
initExperienceNeededMaps();
loadFormula();
}
@ -182,7 +178,7 @@ public class FormulaManager {
Map<Integer, Integer> experienceMapRef = formulaType == FormulaType.LINEAR ? experienceNeededRetroLinear : experienceNeededRetroExponential;
if (!experienceMapRef.containsKey(level)) {
int experience = calculateXPNeeded(level, FormulaType.LINEAR);
int experience = calculateXPNeeded(level, formulaType);
experienceMapRef.put(level, experience);
}