Ver Fonte

Fixed Repair Mastery using incorrect numbers during calculations

nossr50 há 6 anos atrás
pai
commit
df6315dd62

+ 1 - 0
Changelog.txt

@@ -10,6 +10,7 @@ Key:
 Version 2.1.22
     Less aggressive spam click protection on Fishing
     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
     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.

+ 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.Config;
+import com.gmail.nossr50.datatypes.skills.SubSkillType;
 import org.bukkit.Material;
 
 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 Material anvilMaterial  = Config.getInstance().getRepairAnvilMaterial();