From 370af987d6d5e886d27327970f391438a74d694d Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 28 Jan 2019 19:35:54 -0800 Subject: [PATCH] Fixes #3737 --- .../java/com/gmail/nossr50/commands/skills/FishingCommand.java | 3 ++- .../java/com/gmail/nossr50/skills/fishing/FishingManager.java | 2 +- 2 files changed, 3 insertions(+), 2 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 86457d623..29a5b05cf 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java @@ -10,6 +10,7 @@ import com.gmail.nossr50.skills.fishing.Fishing; import com.gmail.nossr50.skills.fishing.FishingManager; import com.gmail.nossr50.util.TextComponentFactory; import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.random.RandomChanceSkillStatic; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; @@ -82,7 +83,7 @@ public class FishingCommand extends SkillCommand { // FISHING_SHAKE if (canShake) { - String[] shakeStrings = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.FISHING_SHAKE); + String[] shakeStrings = RandomChanceUtil.calculateAbilityDisplayValuesStatic(player, PrimarySkillType.FISHING, fishingManager.getShakeChance()); shakeChance = shakeStrings[0]; shakeChanceLucky = shakeStrings[1]; } diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 2b795508b..f35477434 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -114,7 +114,7 @@ public class FishingManager extends SkillManager { return RankUtils.getRank(getPlayer(), SubSkillType.FISHING_TREASURE_HUNTER); } - protected double getShakeChance() { + public double getShakeChance() { return AdvancedConfig.getInstance().getShakeChance(getLootTier()); }