hiscore plugin: add leagues

Co-authored-by: Hydrox6 <ikada@protonmail.ch>
This commit is contained in:
Adam
2019-11-15 09:45:46 -05:00
parent 7463d2de1a
commit 2e024cc688
3 changed files with 19 additions and 5 deletions

View File

@@ -81,6 +81,7 @@ import static net.runelite.http.api.hiscore.HiscoreSkill.HERBLORE;
import static net.runelite.http.api.hiscore.HiscoreSkill.HITPOINTS;
import static net.runelite.http.api.hiscore.HiscoreSkill.HUNTER;
import static net.runelite.http.api.hiscore.HiscoreSkill.LAST_MAN_STANDING;
import static net.runelite.http.api.hiscore.HiscoreSkill.LEAGUE_POINTS;
import static net.runelite.http.api.hiscore.HiscoreSkill.MAGIC;
import static net.runelite.http.api.hiscore.HiscoreSkill.MINING;
import static net.runelite.http.api.hiscore.HiscoreSkill.OVERALL;
@@ -276,6 +277,7 @@ public class HiscorePanel extends PluginPanel
minigamePanel.setBackground(ColorScheme.DARKER_GRAY_COLOR);
minigamePanel.add(makeSkillPanel(CLUE_SCROLL_ALL));
minigamePanel.add(makeSkillPanel(LEAGUE_POINTS));
minigamePanel.add(makeSkillPanel(LAST_MAN_STANDING));
minigamePanel.add(makeSkillPanel(BOUNTY_HUNTER_ROGUE));
minigamePanel.add(makeSkillPanel(BOUNTY_HUNTER_HUNTER));
@@ -470,15 +472,17 @@ public class HiscorePanel extends PluginPanel
case 0:
return null;
case 1:
return HiscoreSkill.OVERALL;
return OVERALL;
case 2:
return HiscoreSkill.CLUE_SCROLL_ALL;
return CLUE_SCROLL_ALL;
case 3:
return HiscoreSkill.LAST_MAN_STANDING;
return LEAGUE_POINTS;
case 4:
return HiscoreSkill.BOUNTY_HUNTER_ROGUE;
return LAST_MAN_STANDING;
case 5:
return HiscoreSkill.BOUNTY_HUNTER_HUNTER;
return BOUNTY_HUNTER_ROGUE;
case 6:
return BOUNTY_HUNTER_HUNTER;
}
return null;
@@ -562,6 +566,12 @@ public class HiscorePanel extends PluginPanel
content += "<p><span style = 'color:white'>Rank:</span> " + rank + "</p>";
break;
}
case LEAGUE_POINTS:
{
String rank = (result.getLeaguePoints().getRank() == -1) ? "Unranked" : QuantityFormatter.formatNumber(result.getLeaguePoints().getRank());
content += "<p><span style = 'color:white'>Rank:</span> " + rank + "</p>";
break;
}
case OVERALL:
{
Skill requestedSkill = result.getSkill(skill);
@@ -651,6 +661,10 @@ public class HiscorePanel extends PluginPanel
{
return HiscoreEndpoint.DEADMAN;
}
else if (wTypes.contains(WorldType.LEAGUE))
{
return HiscoreEndpoint.LEAGUE;
}
}
return HiscoreEndpoint.NORMAL;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B