From fca095689ee4eda19e1380d90950d7315a76978b Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Wed, 9 Jan 2013 16:54:01 +0100 Subject: [PATCH] Fixed wrongly named config node --- .../com/gmail/nossr50/commands/skills/RepairCommand.java | 6 +++--- src/main/java/com/gmail/nossr50/config/AdvancedConfig.java | 2 +- src/main/java/com/gmail/nossr50/skills/repair/Repair.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java index 7e3fba203..652fa87fb 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java @@ -21,7 +21,7 @@ public class RepairCommand extends SkillCommand { private String superRepairChance; private String superRepairChanceLucky; - private float repairMasteryChanceMax = advancedConfig.getRepairMasteryChanceMax(); + private float repairMasteryMaxBonus = advancedConfig.getRepairMasteryMaxBonus(); private float repairMasteryMaxBonusLevel = advancedConfig.getRepairMasteryMaxLevel(); private float superRepairChanceMax = advancedConfig.getSuperRepairChanceMax(); private float superRepairMaxBonusLevel = advancedConfig.getSuperRepairMaxLevel(); @@ -67,8 +67,8 @@ public class RepairCommand extends SkillCommand { salvageLevel = Config.getInstance().getSalvageUnlockLevel(); - if(skillValue >= repairMasteryMaxBonusLevel) repairMasteryBonus = df.format(repairMasteryChanceMax); - else repairMasteryBonus = df.format(((double) repairMasteryChanceMax / (double) repairMasteryMaxBonusLevel) * skillValue); + if(skillValue >= repairMasteryMaxBonusLevel) repairMasteryBonus = df.format(repairMasteryMaxBonus); + else repairMasteryBonus = df.format(((double) repairMasteryMaxBonus / (double) repairMasteryMaxBonusLevel) * skillValue); if(skillValue >= superRepairMaxBonusLevel) superRepairChanceF = superRepairChanceMax; else superRepairChanceF = (float) (((double) superRepairChanceMax / (double) superRepairMaxBonusLevel) * skillValue); diff --git a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java index ddeb8fc11..50ae87221 100644 --- a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java +++ b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java @@ -93,7 +93,7 @@ public class AdvancedConfig extends ConfigLoader { public int getBlastMiningRank7() { return config.getInt("Skills.Mining.BlastMining_Rank7", 875); } public int getBlastMiningRank8() { return config.getInt("Skills.Mining.BlastMining_Rank8", 1000); } /* REPAIR */ - public int getRepairMasteryChanceMax() { return config.getInt("Skills.Repair.RepairMastery_ChanceMax", 200); } + public int getRepairMasteryMaxBonus() { return config.getInt("Skills.Repair.RepairMastery_MaxBonusPercentage", 200); } public int getRepairMasteryMaxLevel() { return config.getInt("Skills.Repair.RepairMastery_MaxBonusLevel", 1000); } public int getSuperRepairChanceMax() { return config.getInt("Skills.Repair.SuperRepair_ChanceMax", 100); } public int getSuperRepairMaxLevel() { return config.getInt("Skills.Repair.SuperRepair_MaxBonusLevel", 1000); } 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 7e2a2f330..7739a469e 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -29,7 +29,7 @@ public class Repair { static AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); - public static final int REPAIR_MASTERY_CHANCE_MAX = advancedConfig.getRepairMasteryChanceMax(); + public static final int REPAIR_MASTERY_CHANCE_MAX = advancedConfig.getRepairMasteryMaxBonus(); public static final int REPAIR_MASTERY_MAX_BONUS_LEVEL = advancedConfig.getRepairMasteryMaxLevel(); public static final int SUPER_REPAIR_CHANCE_MAX = advancedConfig.getSuperRepairChanceMax(); public static final int SUPER_REPAIR_MAX_BONUS_LEVEL = advancedConfig.getSuperRepairMaxLevel();