Update AgilitySession.java
This commit is contained in:
@@ -30,6 +30,7 @@ import lombok.Setter;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Experience;
|
||||
import net.runelite.api.Skill;
|
||||
import net.runelite.api.VarPlayer;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -39,6 +40,7 @@ class AgilitySession
|
||||
private Instant lastLapCompleted;
|
||||
private int totalLaps;
|
||||
private int lapsTillLevel;
|
||||
private int lapsTillGoal;
|
||||
|
||||
AgilitySession(Courses course)
|
||||
{
|
||||
@@ -61,11 +63,14 @@ class AgilitySession
|
||||
} while (remainingXp < 0);
|
||||
|
||||
lapsTillLevel = remainingXp > 0 ? (int) Math.ceil(remainingXp / course.getTotalXp()) : 0;
|
||||
int goalRemainingXp = client.getVar(VarPlayer.AGILITY_GOAL_END) - currentExp;
|
||||
lapsTillGoal = goalRemainingXp > 0 ? (int) Math.ceil(goalRemainingXp / course.getTotalXp()) : 0;
|
||||
}
|
||||
|
||||
void resetLapCount()
|
||||
{
|
||||
totalLaps = 0;
|
||||
lapsTillLevel = 0;
|
||||
lapsTillGoal = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user