Fixing an error with shake and RNG calculations

This commit is contained in:
nossr50 2019-01-28 04:15:34 -08:00
parent fc7b4a6790
commit 3734300e59
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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<ShakeTreasure> possibleDrops = Fishing.findPossibleDrops(target);
if (possibleDrops == null || possibleDrops.isEmpty()) {