From 3a809dab32437c1b7ba144e9ca8018d0e70ec07d Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 7 Mar 2013 12:52:43 -0500 Subject: [PATCH] Fix downgrade chances all being calculated from Rank4. --- src/main/java/com/gmail/nossr50/skills/repair/Repair.java | 6 +++--- .../java/com/gmail/nossr50/skills/repair/RepairManager.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 511a69062..7e33c9914 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -19,15 +19,15 @@ public class Repair { THREE(3) { @Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels3(); } @Override public int getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank3(); } - @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank4(); }}, + @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank3(); }}, TWO(2) { @Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels2(); } @Override public int getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank2(); } - @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank4(); }}, + @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank2(); }}, ONE(1) { @Override public int getLevel() { return AdvancedConfig.getInstance().getArcaneForgingRankLevels1(); } @Override public int getKeepEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingKeepEnchantsChanceRank1(); } - @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank4(); }}; + @Override public int getDowngradeEnchantChance() { return AdvancedConfig.getInstance().getArcaneForgingDowngradeChanceRank1(); }}; int numerical; diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index f8be2ef4c..c21de8ec0 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -304,7 +304,7 @@ public class RepairManager extends SkillManager { Map enchants = item.getEnchantments(); - if (enchants.size() == 0) { + if (enchants.isEmpty()) { return; }