Merge pull request #9940 from Alexsuperfly/agility-pyramid-total-exp
agility: account for bonus exp from agility pyramid
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -33,8 +33,8 @@ enum Courses
|
||||
{
|
||||
GNOME(86.5, 46, 9781),
|
||||
DRAYNOR(120.0, 79, 12338),
|
||||
AL_KHARID(180.0, 30, 13105, new WorldPoint(3299, 3194, 0)),
|
||||
PYRAMID(722.0, 300, 13356, new WorldPoint(3364, 2830, 0)),
|
||||
AL_KHARID(180.0, 0, 13105, new WorldPoint(3299, 3194, 0)),
|
||||
PYRAMID(722.0, 0, 13356, new WorldPoint(3364, 2830, 0)),
|
||||
VARROCK(238.0, 125, 12853),
|
||||
PENGUIN(540.0, 65, 10559),
|
||||
BARBARIAN(139.5, 60, 10039),
|
||||
|
||||
Reference in New Issue
Block a user