runelite-api: change getBoosted/RealSkillLevel to take a Skill
This commit is contained in:
@@ -62,19 +62,16 @@ public class Client
|
||||
.toArray(size -> new Player[size]);
|
||||
}
|
||||
|
||||
public int[] getBoostedSkillLevels()
|
||||
public int getBoostedSkillLevel(Skill skill)
|
||||
{
|
||||
return client.getBoostedSkillLevels();
|
||||
int[] boostedLevels = client.getBoostedSkillLevels();
|
||||
return boostedLevels[skill.ordinal()];
|
||||
}
|
||||
|
||||
public int[] getRealSkillLevels()
|
||||
public int getRealSkillLevel(Skill skill)
|
||||
{
|
||||
return client.getRealSkillLevels();
|
||||
}
|
||||
|
||||
public int[] getSkillExperiences()
|
||||
{
|
||||
return client.getSkillExperiences();
|
||||
int[] realLevels = client.getRealSkillLevels();
|
||||
return realLevels[skill.ordinal()];
|
||||
}
|
||||
|
||||
public void sendGameMessage(String message)
|
||||
|
||||
@@ -66,14 +66,11 @@ class BoostsOverlay extends Overlay
|
||||
|
||||
FontMetrics metrics = graphics.getFontMetrics();
|
||||
|
||||
int[] boostedSkills = client.getBoostedSkillLevels(),
|
||||
baseSkills = client.getRealSkillLevels();
|
||||
|
||||
int height = TOP_BORDER;
|
||||
for (Skill skill : SHOW)
|
||||
{
|
||||
int boosted = boostedSkills[skill.ordinal()],
|
||||
base = baseSkills[skill.ordinal()];
|
||||
int boosted = client.getBoostedSkillLevel(skill),
|
||||
base = client.getRealSkillLevel(skill);
|
||||
|
||||
if (boosted == base)
|
||||
continue;
|
||||
@@ -90,8 +87,8 @@ class BoostsOverlay extends Overlay
|
||||
int y = TOP_BORDER;
|
||||
for (Skill skill : SHOW)
|
||||
{
|
||||
int boosted = boostedSkills[skill.ordinal()],
|
||||
base = baseSkills[skill.ordinal()];
|
||||
int boosted = client.getBoostedSkillLevel(skill),
|
||||
base = client.getRealSkillLevel(skill);
|
||||
|
||||
if (boosted == base)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user