From 0f7bf13834f1a8b71d35ec954a0d945f52387a5f Mon Sep 17 00:00:00 2001 From: matix931 Date: Fri, 31 Aug 2012 18:03:54 +0300 Subject: [PATCH] Update src/main/java/com/gmail/nossr50/skills/repair/Repair.java When DowngradeChance is 0 random can be the same (0 to 99) so can't be <= becouse downgrade will continue --- src/main/java/com/gmail/nossr50/skills/repair/Repair.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5db4ba1eb..dfe31e36f 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -114,7 +114,7 @@ public class Repair { int enchantLevel = enchant.getValue(); if (configInstance.getArcaneForgingDowngradeEnabled() && enchantLevel > 1) { - if (random.nextInt(100) <= getDowngradeChance(rank)) { + if (random.nextInt(100) < getDowngradeChance(rank)) { is.addEnchantment(enchantment, --enchantLevel); downgraded = true; }