runelite-api: change getBoosted/RealSkillLevel to take a Skill

This commit is contained in:
Adam
2017-05-03 19:23:58 -04:00
parent 685771ea6b
commit 747af7cb24
2 changed files with 10 additions and 16 deletions

View File

@@ -62,19 +62,16 @@ public class Client
.toArray(size -> new Player[size]); .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(); int[] realLevels = client.getRealSkillLevels();
} return realLevels[skill.ordinal()];
public int[] getSkillExperiences()
{
return client.getSkillExperiences();
} }
public void sendGameMessage(String message) public void sendGameMessage(String message)

View File

@@ -66,14 +66,11 @@ class BoostsOverlay extends Overlay
FontMetrics metrics = graphics.getFontMetrics(); FontMetrics metrics = graphics.getFontMetrics();
int[] boostedSkills = client.getBoostedSkillLevels(),
baseSkills = client.getRealSkillLevels();
int height = TOP_BORDER; int height = TOP_BORDER;
for (Skill skill : SHOW) for (Skill skill : SHOW)
{ {
int boosted = boostedSkills[skill.ordinal()], int boosted = client.getBoostedSkillLevel(skill),
base = baseSkills[skill.ordinal()]; base = client.getRealSkillLevel(skill);
if (boosted == base) if (boosted == base)
continue; continue;
@@ -90,8 +87,8 @@ class BoostsOverlay extends Overlay
int y = TOP_BORDER; int y = TOP_BORDER;
for (Skill skill : SHOW) for (Skill skill : SHOW)
{ {
int boosted = boostedSkills[skill.ordinal()], int boosted = client.getBoostedSkillLevel(skill),
base = baseSkills[skill.ordinal()]; base = client.getRealSkillLevel(skill);
if (boosted == base) if (boosted == base)
continue; continue;