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
This commit is contained in:
matix931 2012-08-31 18:03:54 +03:00
parent c1d6e79a41
commit 0f7bf13834

View File

@ -114,7 +114,7 @@ public class Repair {
int enchantLevel = enchant.getValue(); int enchantLevel = enchant.getValue();
if (configInstance.getArcaneForgingDowngradeEnabled() && enchantLevel > 1) { if (configInstance.getArcaneForgingDowngradeEnabled() && enchantLevel > 1) {
if (random.nextInt(100) <= getDowngradeChance(rank)) { if (random.nextInt(100) < getDowngradeChance(rank)) {
is.addEnchantment(enchantment, --enchantLevel); is.addEnchantment(enchantment, --enchantLevel);
downgraded = true; downgraded = true;
} }