agility: account for bonus exp from agility pyramid

This commit is contained in:
Alexsuperfly
2019-09-30 12:30:36 -04:00
parent 5a6072de81
commit 1516027001

View File

@@ -53,8 +53,15 @@ class AgilitySession
final int currentExp = client.getSkillExperience(Skill.AGILITY);
final int goalXp = xpTrackerService.getEndGoalXp(Skill.AGILITY);
final int goalRemainingXp = goalXp - currentExp;
double courseTotalExp = course.getTotalXp();
if (course == Courses.PYRAMID)
{
// agility pyramid has a bonus exp drop on the last obstacle that scales with player level and caps at 1000
// the bonus is not already accounted for in the total exp number in the courses enum
courseTotalExp += Math.min(300 + 8 * client.getRealSkillLevel(Skill.AGILITY), 1000);
}
lapsTillGoal = goalRemainingXp > 0 ? (int) Math.ceil(goalRemainingXp / course.getTotalXp()) : 0;
lapsTillGoal = goalRemainingXp > 0 ? (int) Math.ceil(goalRemainingXp / courseTotalExp) : 0;
}
void resetLapCount()