From 9afa8efd7d421804099a93bdf2f81c3ea548b5d4 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Wed, 15 Jan 2014 12:20:05 +0100 Subject: [PATCH] No need to hardcode the max tier here --- .../java/com/gmail/nossr50/commands/skills/FishingCommand.java | 2 +- .../java/com/gmail/nossr50/commands/skills/MiningCommand.java | 2 +- .../java/com/gmail/nossr50/commands/skills/RepairCommand.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java index ac424371f..c14d9370a 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java @@ -159,7 +159,7 @@ public class FishingCommand extends SkillCommand { List messages = new ArrayList(); if (canTreasureHunt) { - messages.add(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.EIGHT.toNumerical())); + messages.add(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.values().length)); messages.add(LocaleLoader.getString("Fishing.Ability.TH.DropRate", trapTreasure, commonTreasure, uncommonTreasure, rareTreasure, epicTreasure, legendaryTreasure, recordTreasure)); } diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index 1f25cfdbb..cd37cec27 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -121,7 +121,7 @@ public class MiningCommand extends SkillCommand { messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.0", unlockLevel))); } else { - messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, Tier.EIGHT.toNumerical(), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, Tier.values().length, LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); } } 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 8cc7e9c4f..5d538a9f1 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java @@ -148,7 +148,7 @@ public class RepairCommand extends SkillCommand { if (canArcaneForge) { RepairManager repairManager = UserManager.getPlayer(player).getRepairManager(); - messages.add(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), Tier.EIGHT.toNumerical())); + messages.add(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), Tier.values().length)); if (ArcaneForging.arcaneForgingEnchantLoss) { messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance())));