mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 20:24:44 +02:00
Fixed Arcobatics & Archery ignoring ChanceMax settings from advanced config
This commit is contained in:
@ -49,7 +49,10 @@ public class ArcheryManager {
|
||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
}
|
||||
final float chance = (float) (((double) Archery.ARROW_TRACKING_MAX_BONUS / (double) Archery.ARROW_TRACKING_MAX_BONUS_LEVEL) * skillLevel);
|
||||
|
||||
float chance = (float) (((double) Archery.ARROW_TRACKING_MAX_BONUS / (double) Archery.ARROW_TRACKING_MAX_BONUS_LEVEL) * skillLevel);
|
||||
if (chance > Archery.ARROW_TRACKING_MAX_BONUS) chance = Archery.ARROW_TRACKING_MAX_BONUS;
|
||||
|
||||
if (chance > Archery.getRandom().nextInt(randomChance)) {
|
||||
eventHandler.addToTracker();
|
||||
}
|
||||
@ -80,7 +83,9 @@ public class ArcheryManager {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
}
|
||||
|
||||
final float chance = (float) (((double) Archery.DAZE_MAX_BONUS / (double) Archery.DAZE_MAX_BONUS_LEVEL) * skillLevel);
|
||||
float chance = (float) (((double) Archery.DAZE_MAX_BONUS / (double) Archery.DAZE_MAX_BONUS_LEVEL) * skillLevel);
|
||||
if (chance > Archery.DAZE_MAX_BONUS) chance = Archery.DAZE_MAX_BONUS;
|
||||
|
||||
if (chance > Archery.getRandom().nextInt(randomChance)) {
|
||||
eventHandler.handleDazeEffect();
|
||||
eventHandler.sendAbilityMessages();
|
||||
|
Reference in New Issue
Block a user