mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixing an error with shake and RNG calculations
This commit is contained in:
parent
fc7b4a6790
commit
3734300e59
@ -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 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 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 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) Tree Feller now works on Mushroom Stems
|
||||||
(Skills) Fixed a bug where magic chance would show as null
|
(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
|
(Skills) Fixed a bug where Trap percentages were added to Fishing even though they no longer exist
|
||||||
|
@ -18,6 +18,7 @@ import com.gmail.nossr50.events.skills.fishing.McMMOPlayerShakeEvent;
|
|||||||
import com.gmail.nossr50.skills.SkillManager;
|
import com.gmail.nossr50.skills.SkillManager;
|
||||||
import com.gmail.nossr50.util.*;
|
import com.gmail.nossr50.util.*;
|
||||||
import com.gmail.nossr50.util.player.NotificationManager;
|
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.random.RandomChanceUtil;
|
||||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||||
import com.gmail.nossr50.util.skills.RankUtils;
|
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
|
* @param target The {@link LivingEntity} affected by the ability
|
||||||
*/
|
*/
|
||||||
public void shakeCheck(LivingEntity target) {
|
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);
|
List<ShakeTreasure> possibleDrops = Fishing.findPossibleDrops(target);
|
||||||
|
|
||||||
if (possibleDrops == null || possibleDrops.isEmpty()) {
|
if (possibleDrops == null || possibleDrops.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user