hiscore result builder: fix building hiscore result with no boss hiscores

THe seasonal hiscore endpoint doesn't include boss hiscores
This commit is contained in:
Adam
2019-12-11 12:21:12 -05:00
parent 4578333fe0
commit e789c72333

View File

@@ -87,6 +87,9 @@ class HiscoreResultBuilder
hiscoreResult.setClueScrollElite(skills.get(index++)); hiscoreResult.setClueScrollElite(skills.get(index++));
hiscoreResult.setClueScrollMaster(skills.get(index++)); hiscoreResult.setClueScrollMaster(skills.get(index++));
hiscoreResult.setLastManStanding(skills.get(index++)); hiscoreResult.setLastManStanding(skills.get(index++));
// seasonal doesn't have boss hiscores
if (index < skills.size())
{
hiscoreResult.setAbyssalSire(skills.get(index++)); hiscoreResult.setAbyssalSire(skills.get(index++));
hiscoreResult.setAlchemicalHydra(skills.get(index++)); hiscoreResult.setAlchemicalHydra(skills.get(index++));
hiscoreResult.setBarrowsChests(skills.get(index++)); hiscoreResult.setBarrowsChests(skills.get(index++));
@@ -130,6 +133,7 @@ class HiscoreResultBuilder
hiscoreResult.setWintertodt(skills.get(index++)); hiscoreResult.setWintertodt(skills.get(index++));
hiscoreResult.setZalcano(skills.get(index++)); hiscoreResult.setZalcano(skills.get(index++));
hiscoreResult.setZulrah(skills.get(index++)); hiscoreResult.setZulrah(skills.get(index++));
}
return hiscoreResult; return hiscoreResult;
} }
} }