From d183b1b9405ce70793e847ec10db496b1cacd031 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 5 Jan 2013 00:52:11 +0100 Subject: [PATCH] Fishermans diet now uses the FoodChance value from advanced.yml --- .../commands/skills/FishingCommand.java | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 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 c599d35dc..ebfbed864 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java @@ -18,6 +18,9 @@ public class FishingCommand extends SkillCommand { private String shakeChance; private String fishermansDietRank; + private int fishermansDietRankChange = advancedConfig.getFarmerDietRankChange(); + private int fishermansDietRankMaxLevel = fishermansDietRankChange * 5; + private boolean canTreasureHunt; private boolean canMagicHunt; private boolean canShake; @@ -37,21 +40,9 @@ public class FishingCommand extends SkillCommand { } shakeChance = String.valueOf(dropChance); - if (skillValue >= 1000) { - fishermansDietRank = "5"; - } - else if (skillValue >= 800) { - fishermansDietRank = "4"; - } - else if (skillValue >= 600) { - fishermansDietRank = "3"; - } - else if (skillValue >= 400) { - fishermansDietRank = "2"; - } - else { - fishermansDietRank = "1"; - } + if(skillValue >= fishermansDietRankMaxLevel) fishermansDietRank = "5"; + else fishermansDietRank = String.valueOf((int) ((double) skillValue / (double) fishermansDietRankChange)); + shakeUnlockLevel = advancedConfig.getShakeUnlockLevel(); }