Browse Source

Fixed Repair Mastery using incorrect numbers during calculations

nossr50 6 years ago
parent
commit
df6315dd62
2 changed files with 3 additions and 1 deletions
  1. 1 0
      Changelog.txt
  2. 2 1
      src/main/java/com/gmail/nossr50/skills/repair/Repair.java

+ 1 - 0
Changelog.txt

@@ -10,6 +10,7 @@ Key:
 Version 2.1.22
 Version 2.1.22
     Less aggressive spam click protection on Fishing
     Less aggressive spam click protection on Fishing
     Added all missing flowers to Double Drop tables for Herbalism
     Added all missing flowers to Double Drop tables for Herbalism
+    Fixed bug where Repair Mastery was calculating player skill level incorrectly when determining bonuses
     Fixed Double Drop entries for all farming crops for Herbalism
     Fixed Double Drop entries for all farming crops for Herbalism
     It no longer requires seeds to replant crops if you are harvesting crops with a hoe (will still consume seeds if you aren't)
     It no longer requires seeds to replant crops if you are harvesting crops with a hoe (will still consume seeds if you aren't)
     NOTE: You'll need to add these entries to your config.yml manually, or wait for the upcoming config update where this will be fixed for you automatically.
     NOTE: You'll need to add these entries to your config.yml manually, or wait for the upcoming config update where this will be fixed for you automatically.

+ 2 - 1
src/main/java/com/gmail/nossr50/skills/repair/Repair.java

@@ -2,10 +2,11 @@ package com.gmail.nossr50.skills.repair;
 
 
 import com.gmail.nossr50.config.AdvancedConfig;
 import com.gmail.nossr50.config.AdvancedConfig;
 import com.gmail.nossr50.config.Config;
 import com.gmail.nossr50.config.Config;
+import com.gmail.nossr50.datatypes.skills.SubSkillType;
 import org.bukkit.Material;
 import org.bukkit.Material;
 
 
 public class Repair {
 public class Repair {
-    public static int    repairMasteryMaxBonusLevel = AdvancedConfig.getInstance().getRepairMasteryMaxLevel();
+    public static int    repairMasteryMaxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.REPAIR_REPAIR_MASTERY);
     public static double repairMasteryMaxBonus      = AdvancedConfig.getInstance().getRepairMasteryMaxBonus();
     public static double repairMasteryMaxBonus      = AdvancedConfig.getInstance().getRepairMasteryMaxBonus();
 
 
     public static Material anvilMaterial  = Config.getInstance().getRepairAnvilMaterial();
     public static Material anvilMaterial  = Config.getInstance().getRepairAnvilMaterial();