From 3734300e59ec42a90db497726179d4f98f745a23 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 28 Jan 2019 04:15:34 -0800 Subject: [PATCH] Fixing an error with shake and RNG calculations --- Changelog.txt | 1 + .../java/com/gmail/nossr50/skills/fishing/FishingManager.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 5b343b5cb..f57ab19a8 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -15,6 +15,7 @@ Version 2.1.2 (Skills) Fixed a bug where Arcane Forging didn't calculate success and failure correctly (Skills) Fixed a bug where Salvage didn't calculate success and failure correctly (Skills) Fixed a bug where Flux Mining didn't calculate success correctly + (Skills) Fixed a bug where Shake didn't calculate correctly (Skills) Tree Feller now works on Mushroom Stems (Skills) Fixed a bug where magic chance would show as null (Skills) Fixed a bug where Trap percentages were added to Fishing even though they no longer exist 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 a293566d9..2b795508b 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -18,6 +18,7 @@ import com.gmail.nossr50.events.skills.fishing.McMMOPlayerShakeEvent; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.*; import com.gmail.nossr50.util.player.NotificationManager; +import com.gmail.nossr50.util.random.RandomChanceSkillStatic; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.RankUtils; @@ -267,7 +268,7 @@ public class FishingManager extends SkillManager { * @param target The {@link LivingEntity} affected by the ability */ public void shakeCheck(LivingEntity target) { - if (RandomChanceUtil.checkRandomChanceExecutionSuccess(getPlayer(), SubSkillType.FISHING_SHAKE, true)) { + if (RandomChanceUtil.checkRandomChanceExecutionSuccess(new RandomChanceSkillStatic(getShakeChance(), getPlayer(), SubSkillType.FISHING_SHAKE))) { List possibleDrops = Fishing.findPossibleDrops(target); if (possibleDrops == null || possibleDrops.isEmpty()) {