Merge remote-tracking branch 'upstream/master' into master
This commit is contained in:
@@ -179,14 +179,14 @@ public class ChatClient
|
||||
}
|
||||
}
|
||||
|
||||
public boolean submitPb(String username, String boss, int pb) throws IOException
|
||||
public boolean submitPb(String username, String boss, double pb) throws IOException
|
||||
{
|
||||
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
|
||||
.addPathSegment("chat")
|
||||
.addPathSegment("pb")
|
||||
.addQueryParameter("name", username)
|
||||
.addQueryParameter("boss", boss)
|
||||
.addQueryParameter("pb", Integer.toString(pb))
|
||||
.addQueryParameter("pb", Double.toString(pb))
|
||||
.build();
|
||||
|
||||
Request request = new Request.Builder()
|
||||
@@ -200,7 +200,7 @@ public class ChatClient
|
||||
}
|
||||
}
|
||||
|
||||
public int getPb(String username, String boss) throws IOException
|
||||
public double getPb(String username, String boss) throws IOException
|
||||
{
|
||||
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
|
||||
.addPathSegment("chat")
|
||||
@@ -219,7 +219,7 @@ public class ChatClient
|
||||
{
|
||||
throw new IOException("Unable to look up personal best!");
|
||||
}
|
||||
return Integer.parseInt(response.body().string());
|
||||
return Double.parseDouble(response.body().string());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ public class HiscoreResult
|
||||
private Skill sarachnis;
|
||||
private Skill scorpia;
|
||||
private Skill skotizo;
|
||||
private Skill tempoross;
|
||||
private Skill gauntlet;
|
||||
private Skill corruptedGauntlet;
|
||||
private Skill theatreOfBlood;
|
||||
@@ -251,6 +252,8 @@ public class HiscoreResult
|
||||
return scorpia;
|
||||
case SKOTIZO:
|
||||
return skotizo;
|
||||
case TEMPOROSS:
|
||||
return tempoross;
|
||||
case THE_GAUNTLET:
|
||||
return gauntlet;
|
||||
case THE_CORRUPTED_GAUNTLET:
|
||||
|
||||
@@ -123,6 +123,10 @@ class HiscoreResultBuilder
|
||||
hiscoreResult.setSarachnis(skills.get(index++));
|
||||
hiscoreResult.setScorpia(skills.get(index++));
|
||||
hiscoreResult.setSkotizo(skills.get(index++));
|
||||
if (skills.size() >= 81)
|
||||
{
|
||||
hiscoreResult.setTempoross(skills.get(index++));
|
||||
}
|
||||
hiscoreResult.setGauntlet(skills.get(index++));
|
||||
hiscoreResult.setCorruptedGauntlet(skills.get(index++));
|
||||
hiscoreResult.setTheatreOfBlood(skills.get(index++));
|
||||
|
||||
@@ -102,6 +102,7 @@ public enum HiscoreSkill
|
||||
SARACHNIS("Sarachnis", BOSS),
|
||||
SCORPIA("Scorpia", BOSS),
|
||||
SKOTIZO("Skotizo", BOSS),
|
||||
TEMPOROSS("Tempoross", BOSS),
|
||||
THE_GAUNTLET("The Gauntlet", BOSS),
|
||||
THE_CORRUPTED_GAUNTLET("The Corrupted Gauntlet", BOSS),
|
||||
THEATRE_OF_BLOOD("Theatre of Blood", BOSS),
|
||||
|
||||
Reference in New Issue
Block a user