Merge pull request #9940 from Alexsuperfly/agility-pyramid-total-exp

agility: account for bonus exp from agility pyramid
This commit is contained in:
Adam
2020-03-06 10:38:11 -05:00
committed by GitHub
2 changed files with 10 additions and 3 deletions

View File

@@ -53,8 +53,15 @@ class AgilitySession
final int currentExp = client.getSkillExperience(Skill.AGILITY); final int currentExp = client.getSkillExperience(Skill.AGILITY);
final int goalXp = xpTrackerService.getEndGoalXp(Skill.AGILITY); final int goalXp = xpTrackerService.getEndGoalXp(Skill.AGILITY);
final int goalRemainingXp = goalXp - currentExp; 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() void resetLapCount()

View File

@@ -33,8 +33,8 @@ enum Courses
{ {
GNOME(86.5, 46, 9781), GNOME(86.5, 46, 9781),
DRAYNOR(120.0, 79, 12338), DRAYNOR(120.0, 79, 12338),
AL_KHARID(180.0, 30, 13105, new WorldPoint(3299, 3194, 0)), AL_KHARID(180.0, 0, 13105, new WorldPoint(3299, 3194, 0)),
PYRAMID(722.0, 300, 13356, new WorldPoint(3364, 2830, 0)), PYRAMID(722.0, 0, 13356, new WorldPoint(3364, 2830, 0)),
VARROCK(238.0, 125, 12853), VARROCK(238.0, 125, 12853),
PENGUIN(540.0, 65, 10559), PENGUIN(540.0, 65, 10559),
BARBARIAN(139.5, 60, 10039), BARBARIAN(139.5, 60, 10039),