From d25546f5db7e13adfdda97a5020f2193329b7644 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 1 May 2020 10:20:18 -0400 Subject: [PATCH 1/3] Add dmmt world type and tournament hiscore endpoint --- .../http/api/hiscore/HiscoreEndpoint.java | 15 ++++----------- .../runelite/http/api/worlds/WorldType.java | 1 + .../http/service/worlds/ServiceWorldType.java | 1 + .../main/java/net/runelite/api/WorldType.java | 6 +++++- .../client/plugins/hiscore/HiscorePanel.java | 17 ++++++++++++++--- .../opponentinfo/OpponentInfoPlugin.java | 6 +++++- .../runelite/client/plugins/hiscore/league.png | Bin 227 -> 0 bytes .../client/plugins/hiscore/tournament.png | Bin 0 -> 3020 bytes 8 files changed, 30 insertions(+), 16 deletions(-) delete mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png diff --git a/http-api/src/main/java/net/runelite/http/api/hiscore/HiscoreEndpoint.java b/http-api/src/main/java/net/runelite/http/api/hiscore/HiscoreEndpoint.java index 8e5a97dfb3..106c5f0ad8 100644 --- a/http-api/src/main/java/net/runelite/http/api/hiscore/HiscoreEndpoint.java +++ b/http-api/src/main/java/net/runelite/http/api/hiscore/HiscoreEndpoint.java @@ -26,8 +26,10 @@ package net.runelite.http.api.hiscore; +import lombok.Getter; import okhttp3.HttpUrl; +@Getter public enum HiscoreEndpoint { NORMAL("Normal", "https://services.runescape.com/m=hiscore_oldschool/index_lite.ws"), @@ -35,7 +37,8 @@ public enum HiscoreEndpoint HARDCORE_IRONMAN("Hardcore Ironman", "https://services.runescape.com/m=hiscore_oldschool_hardcore_ironman/index_lite.ws"), ULTIMATE_IRONMAN("Ultimate Ironman", "https://services.runescape.com/m=hiscore_oldschool_ultimate/index_lite.ws"), DEADMAN("Deadman", "https://services.runescape.com/m=hiscore_oldschool_deadman/index_lite.ws"), - LEAGUE("Twisted League", "https://services.runescape.com/m=hiscore_oldschool_seasonal/index_lite.ws"); + LEAGUE("Twisted League", "https://services.runescape.com/m=hiscore_oldschool_seasonal/index_lite.ws"), + TOURNAMENT("Tournament", "https://services.runescape.com/m=hiscore_oldschool_tournament/index_lite.ws"); private final String name; private final HttpUrl hiscoreURL; @@ -45,14 +48,4 @@ public enum HiscoreEndpoint this.name = name; this.hiscoreURL = HttpUrl.parse(hiscoreURL); } - - public String getName() - { - return name; - } - - public HttpUrl getHiscoreURL() - { - return hiscoreURL; - } } diff --git a/http-api/src/main/java/net/runelite/http/api/worlds/WorldType.java b/http-api/src/main/java/net/runelite/http/api/worlds/WorldType.java index af543b7383..9e6ae694e3 100644 --- a/http-api/src/main/java/net/runelite/http/api/worlds/WorldType.java +++ b/http-api/src/main/java/net/runelite/http/api/worlds/WorldType.java @@ -34,5 +34,6 @@ public enum WorldType LAST_MAN_STANDING, TOURNAMENT, DEADMAN, + DEADMAN_TOURNAMENT, LEAGUE; } diff --git a/http-service/src/main/java/net/runelite/http/service/worlds/ServiceWorldType.java b/http-service/src/main/java/net/runelite/http/service/worlds/ServiceWorldType.java index 896f152752..d0a7b62103 100644 --- a/http-service/src/main/java/net/runelite/http/service/worlds/ServiceWorldType.java +++ b/http-service/src/main/java/net/runelite/http/service/worlds/ServiceWorldType.java @@ -35,6 +35,7 @@ enum ServiceWorldType HIGH_RISK(WorldType.HIGH_RISK, 1 << 10), LAST_MAN_STANDING(WorldType.LAST_MAN_STANDING, 1 << 14), TOURNAMENT(WorldType.TOURNAMENT, 1 << 25), + DEADMAN_TOURNAMENT(WorldType.DEADMAN_TOURNAMENT, 1 << 26), DEADMAN(WorldType.DEADMAN, 1 << 29), LEAGUE(WorldType.LEAGUE, 1 << 30); diff --git a/runelite-api/src/main/java/net/runelite/api/WorldType.java b/runelite-api/src/main/java/net/runelite/api/WorldType.java index 618d272796..2bd54cf0ed 100644 --- a/runelite-api/src/main/java/net/runelite/api/WorldType.java +++ b/runelite-api/src/main/java/net/runelite/api/WorldType.java @@ -60,6 +60,10 @@ public enum WorldType * Tournament world type. */ TOURNAMENT(1 << 25), + /** + * Deadman Tournament world type. + */ + DEADMAN_TOURNAMENT(1 << 26), /** * Deadman world type. */ @@ -77,7 +81,7 @@ public enum WorldType } private static final EnumSet PVP_WORLD_TYPES = EnumSet.of( - DEADMAN, + DEADMAN, // dmmt worlds are also flaged as DEADMAN PVP ); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java index ca5df48a6b..5a82c4fb22 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/hiscore/HiscorePanel.java @@ -70,6 +70,7 @@ import net.runelite.http.api.hiscore.HiscoreSkill; import static net.runelite.http.api.hiscore.HiscoreSkill.*; import net.runelite.http.api.hiscore.HiscoreSkillType; import net.runelite.http.api.hiscore.Skill; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; @Slf4j @@ -113,6 +114,10 @@ public class HiscorePanel extends PluginPanel ZALCANO, ZULRAH ); + private static final HiscoreEndpoint[] ENDPOINTS = new HiscoreEndpoint[] { + HiscoreEndpoint.NORMAL, HiscoreEndpoint.IRONMAN, HiscoreEndpoint.HARDCORE_IRONMAN, HiscoreEndpoint.ULTIMATE_IRONMAN, HiscoreEndpoint.DEADMAN, HiscoreEndpoint.TOURNAMENT + }; + @Inject ScheduledExecutorService executor; @@ -200,7 +205,7 @@ public class HiscorePanel extends PluginPanel tabGroup = new MaterialTabGroup(); tabGroup.setLayout(new GridLayout(1, 5, 7, 7)); - for (HiscoreEndpoint endpoint : HiscoreEndpoint.values()) + for (HiscoreEndpoint endpoint : ENDPOINTS) { final BufferedImage iconImage = ImageUtil.getResourceStreamFromClass(getClass(), endpoint.name().toLowerCase() + ".png"); @@ -681,7 +686,9 @@ public class HiscorePanel extends PluginPanel private void resetEndpoints() { // Select the correct tab based on the world type. - tabGroup.select(tabGroup.getTab(selectWorldEndpoint().ordinal())); + HiscoreEndpoint endpoint = selectWorldEndpoint(); + int idx = ArrayUtils.indexOf(ENDPOINTS, endpoint); + tabGroup.select(tabGroup.getTab(idx)); } private HiscoreEndpoint selectWorldEndpoint() @@ -690,7 +697,11 @@ public class HiscorePanel extends PluginPanel { EnumSet wTypes = client.getWorldType(); - if (wTypes.contains(WorldType.DEADMAN)) + if (wTypes.contains(WorldType.DEADMAN_TOURNAMENT)) + { + return HiscoreEndpoint.TOURNAMENT; + } + else if (wTypes.contains(WorldType.DEADMAN)) { return HiscoreEndpoint.DEADMAN; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/opponentinfo/OpponentInfoPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/opponentinfo/OpponentInfoPlugin.java index f411fc2dae..7faea8bc1f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/opponentinfo/OpponentInfoPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/opponentinfo/OpponentInfoPlugin.java @@ -113,7 +113,11 @@ public class OpponentInfoPlugin extends Plugin } final EnumSet worldType = client.getWorldType(); - if (worldType.contains(WorldType.DEADMAN)) + if (worldType.contains(WorldType.DEADMAN_TOURNAMENT)) + { + hiscoreEndpoint = HiscoreEndpoint.TOURNAMENT; + } + else if (worldType.contains(WorldType.DEADMAN)) { hiscoreEndpoint = HiscoreEndpoint.DEADMAN; } diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png b/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/league.png deleted file mode 100644 index b9473db51212d5e3647a34153295c19831436c22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmV<90382`P)s420+j9|94NojZl7H*0~2ps#$(B1k*LFk^zda dKR~3_dL8R`0;|g?e7pbv002ovPDHLkV1hamT-5*o diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png b/runelite-client/src/main/resources/net/runelite/client/plugins/hiscore/tournament.png new file mode 100644 index 0000000000000000000000000000000000000000..e74b1d940b387aa63d4bffeb3e8fd257950db778 GIT binary patch literal 3020 zcmV;-3p4bIP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfo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E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002@Nkl9LTKw3z01X`BobB9wiH~%~%M`o9lDd zZ`p0k)+ArBjO#gWP&GbhBsVu(RBNkNv%i!i_v=@I8mup-XCOO9V&c~veehe9`LD+Z zgCvd@qX43QO^=cVI^Tfjoz`UcB$E&&N4C)a=x_$Jt6vLW|CRQScn<(Xdyd4pn%g`8 O0000 Date: Fri, 1 May 2020 15:44:35 +0000 Subject: [PATCH 2/3] Release 1.6.13 --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index b75ef93d3b..374384e0d8 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index ebcff640f4..5572c0a65e 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 6530a9f5a7..7e839b5e00 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index fa8cefea51..bb6e630939 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index 5f31161607..edc2b65641 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 Web Service diff --git a/pom.xml b/pom.xml index 3502d14ca2..2c52018df8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 pom RuneLite @@ -60,7 +60,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.6.13 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 7dc379a815..d00cba2705 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 7d8e35781d..676b678b7b 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 579383aaf7..54950fda28 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13-SNAPSHOT + 1.6.13 script-assembler-plugin From 1db99628a117054cb7f854174fff74d6785a81ea Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Fri, 1 May 2020 15:44:43 +0000 Subject: [PATCH 3/3] Bump for 1.6.14-SNAPSHOT --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 374384e0d8..5c3dcc7ab6 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 5572c0a65e..4ac49b7b23 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 7e839b5e00..9879ebaf2c 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index bb6e630939..7cd118d3c1 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index edc2b65641..8c5d8431ad 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index 2c52018df8..c9a8c5a3e1 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT pom RuneLite @@ -60,7 +60,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.6.13 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index d00cba2705..c6bd9f05c0 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index 676b678b7b..d2108f4f81 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT client diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 54950fda28..568fe9491e 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.6.13 + 1.6.14-SNAPSHOT script-assembler-plugin