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.
This commit is contained in:
Ivo Julca 2014-09-26 05:42:54 -05:00
parent 3c6dd290f4
commit ec1a1deae8

View File

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