Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
project: Merge upstream and fix worldmap hooks (#2139)
Browse files Browse the repository at this point in the history
project: Merge upstream and fix worldmap hooks

Co-authored-by: Abex <[email protected]>
Co-authored-by: Hydrox <[email protected]>
Co-authored-by: Linda Lapinlampi <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: h3half <[email protected]>
Co-authored-by: TheStonedTurtle <[email protected]>
Co-authored-by: null <[email protected]>
Co-authored-by: Aaron Goff <[email protected]>
Co-authored-by: null <[email protected]>
Co-authored-by: Runelite auto updater <[email protected]>
Co-authored-by: null <[email protected]>
Co-authored-by: ln <[email protected]>
  • Loading branch information
13 people authored Dec 17, 2019
2 parents 3eee296 + 0d3fa8c commit db85779
Show file tree
Hide file tree
Showing 23 changed files with 511 additions and 89 deletions.
17 changes: 2 additions & 15 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

const val kotlinVersion = "1.3.50"

object ProjectVersions {
const val launcherVersion = "2.0.4"
const val rlVersion = "1.5.44-SNAPSHOT"
const val rlVersion = "1.5.43"

const val openosrsVersion = "2.1.18-SNAPSHOT"
const val openosrsVersion = "2.1.18"

const val rsversion = 187
const val cacheversion = 165
Expand Down Expand Up @@ -64,13 +62,8 @@ object Libraries {
const val guice = "4.2.2"
const val h2 = "1.4.200"
const val hamcrest = "2.2"
const val httpcore = "4.4.12"
const val httpmime = "4.5.10"
const val javassist = "3.26.0-GA"
const val javax = "1.3.2"
const val javaxInject = "1"
const val jbsdiff = "1.0"
const val jclCore = "2.8"
const val jedis = "3.1.0"
const val jna = "5.5.0"
const val jogamp = "2.3.2"
Expand Down Expand Up @@ -114,7 +107,6 @@ object Libraries {
const val apacheCommonsText = "org.apache.commons:commons-text:${Versions.apacheCommonsText}"
const val asmAll = "org.ow2.asm:asm:${Versions.asm}"
const val asmUtil = "org.ow2.asm:asm-util:${Versions.asm}"
const val asmTree = "org.ow2.asm:asm-tree:${Versions.asm}"
const val commonsCli = "commons-cli:commons-cli:${Versions.commonsCli}"
const val discord = "net.runelite:discord:${Versions.discord}"
const val fernflower = "net.runelite:fernflower:${Versions.fernflower}"
Expand All @@ -126,13 +118,8 @@ object Libraries {
const val guiceTestlib = "com.google.inject.extensions:guice-testlib:${Versions.guice}"
const val h2 = "com.h2database:h2:${Versions.h2}"
const val hamcrest = "org.hamcrest:hamcrest-library:${Versions.hamcrest}"
const val httpcore = "org.apache.httpcomponents:httpcore:${Versions.httpcore}"
const val httpmime = "org.apache.httpcomponents:httpmime:${Versions.httpmime}"
const val javassist = "org.javassist:javassist:${Versions.javassist}"
const val javax = "javax.annotation:javax.annotation-api:${Versions.javax}"
const val javaxInject = "javax.inject:javax.inject:${Versions.javaxInject}"
const val jbsdiff = "io.sigpipe:jbsdiff:${Versions.jbsdiff}"
const val jclCore = "org.xeustechnologies:jcl-core:${Versions.jclCore}"
const val jedis = "redis.clients:jedis:${Versions.jedis}"
const val jna = "net.java.dev.jna:jna:${Versions.jna}"
const val jnaPlatform = "net.java.dev.jna:jna-platform:${Versions.jna}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,49 @@ public class HiscoreResult
private Skill clueScrollElite;
private Skill clueScrollMaster;
private Skill lastManStanding;
private Skill abyssalSire;
private Skill alchemicalHydra;
private Skill barrowsChests;
private Skill bryophyta;
private Skill callisto;
private Skill cerberus;
private Skill chambersOfXeric;
private Skill chambersOfXericChallengeMode;
private Skill chaosElemental;
private Skill chaosFanatic;
private Skill commanderZilyana;
private Skill corporealBeast;
private Skill crazyArchaeologist;
private Skill dagannothPrime;
private Skill dagannothRex;
private Skill dagannothSupreme;
private Skill derangedArchaeologist;
private Skill generalGraardor;
private Skill giantMole;
private Skill grotesqueGuardians;
private Skill hespori;
private Skill kalphiteQueen;
private Skill kingBlackDragon;
private Skill kraken;
private Skill kreearra;
private Skill krilTsutsaroth;
private Skill mimic;
private Skill obor;
private Skill sarachnis;
private Skill scorpia;
private Skill skotizo;
private Skill gauntlet;
private Skill corruptedGauntlet;
private Skill theatreOfBlood;
private Skill thermonuclearSmokeDevil;
private Skill tzKalZuk;
private Skill tzTokJad;
private Skill venenatis;
private Skill vetion;
private Skill vorkath;
private Skill wintertodt;
private Skill zalcano;
private Skill zulrah;

public Skill getSkill(HiscoreSkill skill)
{
Expand Down Expand Up @@ -140,8 +183,94 @@ public Skill getSkill(HiscoreSkill skill)
return getClueScrollMaster();
case LAST_MAN_STANDING:
return getLastManStanding();
case ABYSSAL_SIRE:
return abyssalSire;
case ALCHEMICAL_HYDRA:
return alchemicalHydra;
case BARROWS_CHESTS:
return barrowsChests;
case BRYOPHYTA:
return bryophyta;
case CALLISTO:
return callisto;
case CERBERUS:
return cerberus;
case CHAMBERS_OF_XERIC:
return chambersOfXeric;
case CHAMBERS_OF_XERIC_CHALLENGE_MODE:
return chambersOfXericChallengeMode;
case CHAOS_ELEMENTAL:
return chaosElemental;
case CHAOS_FANATIC:
return chaosFanatic;
case COMMMANDER_ZILYANA:
return commanderZilyana;
case CORPOREAL_BEAST:
return corporealBeast;
case CRAZY_ARCHAEOLOGIST:
return crazyArchaeologist;
case DAGANNOTH_PRIME:
return dagannothPrime;
case DAGANNOTH_REX:
return dagannothRex;
case DAGANNOTH_SUPREME:
return dagannothSupreme;
case DERANGED_ARCHAEOLOGIST:
return derangedArchaeologist;
case GENERAL_GRAARDOR:
return generalGraardor;
case GIANT_MOLE:
return giantMole;
case GROTESQUE_GUARDIANS:
return grotesqueGuardians;
case HESPORI:
return hespori;
case KALPHITE_QUEEN:
return kalphiteQueen;
case KING_BLACK_DRAGON:
return kingBlackDragon;
case KRAKEN:
return kraken;
case KREEARRA:
return kreearra;
case KRIL_TSUTSAROTH:
return krilTsutsaroth;
case MIMIC:
return mimic;
case OBOR:
return obor;
case SARACHNIS:
return sarachnis;
case SCORPIA:
return scorpia;
case SKOTIZO:
return skotizo;
case THE_GAUNTLET:
return gauntlet;
case THE_CORRUPTED_GAUNTLET:
return corruptedGauntlet;
case THEATRE_OF_BLOOD:
return theatreOfBlood;
case THERMONUCLEAR_SMOKE_DEVIL:
return thermonuclearSmokeDevil;
case TZKAL_ZUK:
return tzKalZuk;
case TZTOK_JAD:
return tzTokJad;
case VENENATIS:
return venenatis;
case VETION:
return vetion;
case VORKATH:
return vorkath;
case WINTERTODT:
return wintertodt;
case ZALCANO:
return zalcano;
case ZULRAH:
return zulrah;
default:
throw new IllegalArgumentException("Invalid hiscore skill");
}

throw new IllegalArgumentException("Invalid hiscore item");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.ArrayList;
import java.util.List;

public class HiscoreResultBuilder
class HiscoreResultBuilder
{
private String player;
private final List<Skill> skills = new ArrayList<>();
Expand All @@ -37,7 +37,7 @@ public void setPlayer(String player)
this.player = player;
}

public void setNextSkill(Skill skill)
void setNextSkill(Skill skill)
{
skills.add(skill);
}
Expand All @@ -51,41 +51,89 @@ public HiscoreResult build()
{
HiscoreResult hiscoreResult = new HiscoreResult();
hiscoreResult.setPlayer(player);
hiscoreResult.setOverall(skills.get(0));
hiscoreResult.setAttack(skills.get(1));
hiscoreResult.setDefence(skills.get(2));
hiscoreResult.setStrength(skills.get(3));
hiscoreResult.setHitpoints(skills.get(4));
hiscoreResult.setRanged(skills.get(5));
hiscoreResult.setPrayer(skills.get(6));
hiscoreResult.setMagic(skills.get(7));
hiscoreResult.setCooking(skills.get(8));
hiscoreResult.setWoodcutting(skills.get(9));
hiscoreResult.setFletching(skills.get(10));
hiscoreResult.setFishing(skills.get(11));
hiscoreResult.setFiremaking(skills.get(12));
hiscoreResult.setCrafting(skills.get(13));
hiscoreResult.setSmithing(skills.get(14));
hiscoreResult.setMining(skills.get(15));
hiscoreResult.setHerblore(skills.get(16));
hiscoreResult.setAgility(skills.get(17));
hiscoreResult.setThieving(skills.get(18));
hiscoreResult.setSlayer(skills.get(19));
hiscoreResult.setFarming(skills.get(20));
hiscoreResult.setRunecraft(skills.get(21));
hiscoreResult.setHunter(skills.get(22));
hiscoreResult.setConstruction(skills.get(23));
hiscoreResult.setLeaguePoints(skills.get(24));
hiscoreResult.setBountyHunterHunter(skills.get(25));
hiscoreResult.setBountyHunterRogue(skills.get(26));
hiscoreResult.setClueScrollAll(skills.get(27));
hiscoreResult.setClueScrollBeginner(skills.get(28));
hiscoreResult.setClueScrollEasy(skills.get(29));
hiscoreResult.setClueScrollMedium(skills.get(30));
hiscoreResult.setClueScrollHard(skills.get(31));
hiscoreResult.setClueScrollElite(skills.get(32));
hiscoreResult.setClueScrollMaster(skills.get(33));
hiscoreResult.setLastManStanding(skills.get(34));
int index = 0;
hiscoreResult.setOverall(skills.get(index++));
hiscoreResult.setAttack(skills.get(index++));
hiscoreResult.setDefence(skills.get(index++));
hiscoreResult.setStrength(skills.get(index++));
hiscoreResult.setHitpoints(skills.get(index++));
hiscoreResult.setRanged(skills.get(index++));
hiscoreResult.setPrayer(skills.get(index++));
hiscoreResult.setMagic(skills.get(index++));
hiscoreResult.setCooking(skills.get(index++));
hiscoreResult.setWoodcutting(skills.get(index++));
hiscoreResult.setFletching(skills.get(index++));
hiscoreResult.setFishing(skills.get(index++));
hiscoreResult.setFiremaking(skills.get(index++));
hiscoreResult.setCrafting(skills.get(index++));
hiscoreResult.setSmithing(skills.get(index++));
hiscoreResult.setMining(skills.get(index++));
hiscoreResult.setHerblore(skills.get(index++));
hiscoreResult.setAgility(skills.get(index++));
hiscoreResult.setThieving(skills.get(index++));
hiscoreResult.setSlayer(skills.get(index++));
hiscoreResult.setFarming(skills.get(index++));
hiscoreResult.setRunecraft(skills.get(index++));
hiscoreResult.setHunter(skills.get(index++));
hiscoreResult.setConstruction(skills.get(index++));
hiscoreResult.setLeaguePoints(skills.get(index++));
hiscoreResult.setBountyHunterHunter(skills.get(index++));
hiscoreResult.setBountyHunterRogue(skills.get(index++));
hiscoreResult.setClueScrollAll(skills.get(index++));
hiscoreResult.setClueScrollBeginner(skills.get(index++));
hiscoreResult.setClueScrollEasy(skills.get(index++));
hiscoreResult.setClueScrollMedium(skills.get(index++));
hiscoreResult.setClueScrollHard(skills.get(index++));
hiscoreResult.setClueScrollElite(skills.get(index++));
hiscoreResult.setClueScrollMaster(skills.get(index++));
hiscoreResult.setLastManStanding(skills.get(index++));
// seasonal doesn't have boss hiscores
if (index < skills.size())
{
hiscoreResult.setAbyssalSire(skills.get(index++));
hiscoreResult.setAlchemicalHydra(skills.get(index++));
hiscoreResult.setBarrowsChests(skills.get(index++));
hiscoreResult.setBryophyta(skills.get(index++));
// hiscoreResult.setCallisto(skills.get(index++));
// hiscoreResult.setCerberus(skills.get(index++));
hiscoreResult.setChambersOfXeric(skills.get(index++));
hiscoreResult.setChambersOfXericChallengeMode(skills.get(index++));
hiscoreResult.setChaosElemental(skills.get(index++));
hiscoreResult.setChaosFanatic(skills.get(index++));
hiscoreResult.setCommanderZilyana(skills.get(index++));
hiscoreResult.setCorporealBeast(skills.get(index++));
hiscoreResult.setCrazyArchaeologist(skills.get(index++));
hiscoreResult.setDagannothPrime(skills.get(index++));
hiscoreResult.setDagannothRex(skills.get(index++));
hiscoreResult.setDagannothSupreme(skills.get(index++));
hiscoreResult.setDerangedArchaeologist(skills.get(index++));
hiscoreResult.setGeneralGraardor(skills.get(index++));
hiscoreResult.setGiantMole(skills.get(index++));
hiscoreResult.setGrotesqueGuardians(skills.get(index++));
hiscoreResult.setHespori(skills.get(index++));
hiscoreResult.setKalphiteQueen(skills.get(index++));
hiscoreResult.setKingBlackDragon(skills.get(index++));
hiscoreResult.setKraken(skills.get(index++));
hiscoreResult.setKreearra(skills.get(index++));
hiscoreResult.setKrilTsutsaroth(skills.get(index++));
hiscoreResult.setMimic(skills.get(index++));
hiscoreResult.setObor(skills.get(index++));
hiscoreResult.setSarachnis(skills.get(index++));
hiscoreResult.setScorpia(skills.get(index++));
hiscoreResult.setSkotizo(skills.get(index++));
hiscoreResult.setGauntlet(skills.get(index++));
hiscoreResult.setCorruptedGauntlet(skills.get(index++));
hiscoreResult.setTheatreOfBlood(skills.get(index++));
hiscoreResult.setThermonuclearSmokeDevil(skills.get(index++));
hiscoreResult.setTzKalZuk(skills.get(index++));
hiscoreResult.setTzTokJad(skills.get(index++));
hiscoreResult.setVenenatis(skills.get(index++));
hiscoreResult.setVetion(skills.get(index++));
hiscoreResult.setVorkath(skills.get(index++));
hiscoreResult.setWintertodt(skills.get(index++));
hiscoreResult.setZalcano(skills.get(index++));
hiscoreResult.setZulrah(skills.get(index++));
}
return hiscoreResult;
}
}
Loading

0 comments on commit db85779

Please sign in to comment.