From ec1a1deae82391adddcb6a946b91afe251666851 Mon Sep 17 00:00:00 2001 From: Ivo Julca Date: Fri, 26 Sep 2014 05:42:54 -0500 Subject: [PATCH] Acrobatics: cap same-location fall counter for XP gain It used to increase boundlessly, thus preventing players from gaining XP for a while even after moving to another place. --- .../nossr50/skills/acrobatics/AcrobaticsManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java index 851f0daf5..8c8d5324e 100644 --- a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java @@ -148,7 +148,13 @@ public class AcrobaticsManager extends SkillManager { fallTries = sameLocation ? fallTries + 1 : Math.max(fallTries - 1, 0); lastFallLocation = fallLocation; - return fallTries > Config.getInstance().getAcrobaticsAFKMaxTries(); + int maxTries = Config.getInstance().getAcrobaticsAFKMaxTries(); + + if (fallTries <= maxTries) { + return false; + } + fallTries = maxTries; + return true; } private boolean isFatal(double damage) {