diff --git a/bootstrap.json b/bootstrap.json
new file mode 100644
index 0000000000..2052530dbe
--- /dev/null
+++ b/bootstrap.json
@@ -0,0 +1,299 @@
+{
+ "buildCommit": "2d0c2b8eb66a8088b41b29d42ec2a58ead460581",
+ "artifacts": [
+ {
+ "hash": "b12331da8683e5f107d294adeebb83ecf9124abc1db533554d2a8d3c62832d75",
+ "name": "asm-all-6.0_BETA.jar",
+ "path": "https://mvn.runelite.net/org/ow2/asm/asm-all/6.0_BETA/asm-all-6.0_BETA.jar",
+ "size": "265176"
+ },
+ {
+ "hash": "37abf0103ce5318bfda004fabc004c75ed0dc6d392a8459175692ab7eac97083",
+ "name": "naturalmouse-2.0.0.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/naturalmouse-2.0.0.jar",
+ "size": "3168921"
+ },
+ {
+ "hash": "50d1e07f11827672249dee9ce8a23691fc59f663deed084bb7b52a4f778d5fbc",
+ "name": "jcl-core-2.9-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/artifacts/jcl-core-2.9-SNAPSHOT.jar",
+ "size": "3168921"
+ },
+ {
+ "hash": "4c388a85fb538bbb8cb6e0fd93e0ba0666605123d77b976764818be6f090bbe5",
+ "name": "client-1.5.28-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/client-1.5.28-SNAPSHOT.jar",
+ "size": "5871886"
+ },
+ {
+ "hash": "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79",
+ "name": "slf4j-api-1.7.25.jar",
+ "path": "https://mvn.runelite.net/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar",
+ "size": "41203"
+ },
+ {
+ "hash": "fb53f8539e7fcb8f093a56e138112056ec1dc809ebb020b59d8a36a5ebac37e0",
+ "name": "logback-classic-1.2.3.jar",
+ "path": "https://mvn.runelite.net/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar",
+ "size": "290339"
+ },
+ {
+ "hash": "5946d837fe6f960c02a53eda7a6926ecc3c758bbdd69aa453ee429f858217f22",
+ "name": "logback-core-1.2.3.jar",
+ "path": "https://mvn.runelite.net/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar",
+ "size": "471901"
+ },
+ {
+ "hash": "9f0c8d50fa4b79b6ff1502dbec8502179d6b9497cacbe17a13074001aed537ec",
+ "name": "jopt-simple-5.0.1.jar",
+ "path": "https://mvn.runelite.net/net/sf/jopt-simple/jopt-simple/5.0.1/jopt-simple-5.0.1.jar",
+ "size": "78826"
+ },
+ {
+ "hash": "5be9a7d05ba0ccd74708bc8018ae412255f85843c0b92302e9b9befa6ed52564",
+ "name": "guava-23.2-jre.jar",
+ "path": "https://mvn.runelite.net/com/google/guava/guava/23.2-jre/guava-23.2-jre.jar",
+ "size": "2649860"
+ },
+ {
+ "hash": "905721a0eea90a81534abb7ee6ef4ea2e5e645fa1def0a5cd88402df1b46c9ed",
+ "name": "jsr305-1.3.9.jar",
+ "path": "https://mvn.runelite.net/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar",
+ "size": "33015"
+ },
+ {
+ "hash": "cb4cfad870bf563a07199f3ebea5763f0dec440fcda0b318640b1feaa788656b",
+ "name": "error_prone_annotations-2.0.18.jar",
+ "path": "https://mvn.runelite.net/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar",
+ "size": "12078"
+ },
+ {
+ "hash": "2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6",
+ "name": "j2objc-annotations-1.1.jar",
+ "path": "https://mvn.runelite.net/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar",
+ "size": "8782"
+ },
+ {
+ "hash": "2068320bd6bad744c3673ab048f67e30bef8f518996fa380033556600669905d",
+ "name": "animal-sniffer-annotations-1.14.jar",
+ "path": "https://mvn.runelite.net/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar",
+ "size": "3482"
+ },
+ {
+ "hash": "9264c6931c431e928dc64adc842584d5f57d17b2f3aff29221f2b3fdea673dad",
+ "name": "guice-4.1.0-no_aop.jar",
+ "path": "https://mvn.runelite.net/com/google/inject/guice/4.1.0/guice-4.1.0-no_aop.jar",
+ "size": "428603"
+ },
+ {
+ "hash": "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff",
+ "name": "javax.inject-1.jar",
+ "path": "https://mvn.runelite.net/javax/inject/javax.inject/1/javax.inject-1.jar",
+ "size": "2497"
+ },
+ {
+ "hash": "0addec670fedcd3f113c5c8091d783280d23f75e3acb841b61a9cdb079376a08",
+ "name": "aopalliance-1.0.jar",
+ "path": "https://mvn.runelite.net/aopalliance/aopalliance/1.0/aopalliance-1.0.jar",
+ "size": "4467"
+ },
+ {
+ "hash": "233a0149fc365c9f6edbd683cfe266b19bdc773be98eabdaf6b3c924b48e7d81",
+ "name": "gson-2.8.5.jar",
+ "path": "https://mvn.runelite.net/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar",
+ "size": "241622"
+ },
+ {
+ "hash": "0467d25f408428824d5c9c09ec60ee1f0bc341d9bf48971a77fd14939a826c83",
+ "name": "substance-8.0.02.jar",
+ "path": "https://repo.runelite.net/net/runelite/pushingpixels/substance/8.0.02/substance-8.0.02.jar",
+ "size": "1589195"
+ },
+ {
+ "hash": "3214e1c23d549d5d67c91da4da1ef33c5248470bb824f91cbe8f9e0beea59eef",
+ "name": "trident-1.5.00.jar",
+ "path": "https://repo.runelite.net/net/runelite/pushingpixels/trident/1.5.00/trident-1.5.00.jar",
+ "size": "79726"
+ },
+ {
+ "hash": "d4a57bbc1627da7c391308fd0fe910b83170fb66afd117236a5b111d2db1590b",
+ "name": "commons-text-1.2.jar",
+ "path": "https://mvn.runelite.net/org/apache/commons/commons-text/1.2/commons-text-1.2.jar",
+ "size": "136544"
+ },
+ {
+ "hash": "6e8dc31e046508d9953c96534edf0c2e0bfe6f468966b5b842b3f87e43b6a847",
+ "name": "commons-lang3-3.7.jar",
+ "path": "https://mvn.runelite.net/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar",
+ "size": "499634"
+ },
+ {
+ "hash": "e74603dc77b4183f108480279dbbf7fed3ac206069478636406c1fb45e83b31a",
+ "name": "jogl-all-2.3.2.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar",
+ "size": "3414448"
+ },
+ {
+ "hash": "8c53b1884cef19309d34fd10a94b010136d9d6de9a88c386f46006fb47acab5d",
+ "name": "jogl-all-2.3.2-natives-windows-amd64.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-amd64.jar",
+ "size": "240721"
+ },
+ {
+ "hash": "507a0e6bd1ee4e81c3dfb287783af93775864eec742988d4162f98ce0cbac9d6",
+ "name": "jogl-all-2.3.2-natives-windows-i586.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-windows-i586.jar",
+ "size": "209445"
+ },
+ {
+ "hash": "82637302ae9effdf7d6f302e1050ad6aee3b13019914ddda5b502b9faa980216",
+ "name": "jogl-all-2.3.2-natives-linux-amd64.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-amd64.jar",
+ "size": "224010"
+ },
+ {
+ "hash": "f474ef2ef01be24ec811d3858b0f4bc5659076975f4a58ddd79abd787e9305c7",
+ "name": "jogl-all-2.3.2-natives-linux-i586.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2-natives-linux-i586.jar",
+ "size": "217274"
+ },
+ {
+ "hash": "084844543b18f7ff71b4c0437852bd22f0cb68d7e44c2c611c1bbea76f8c6fdf",
+ "name": "gluegen-rt-2.3.2.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar",
+ "size": "345605"
+ },
+ {
+ "hash": "3474017422eff384db466bdb56c96c61220c43133a9da6329cf1781bea16c6b6",
+ "name": "gluegen-rt-2.3.2-natives-windows-amd64.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-amd64.jar",
+ "size": "8159"
+ },
+ {
+ "hash": "4eeed9fc2ebea5b9dc48a342b9478d127e989a2e1aa7129b512a98ec75cde338",
+ "name": "gluegen-rt-2.3.2-natives-windows-i586.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-windows-i586.jar",
+ "size": "7577"
+ },
+ {
+ "hash": "f2dfd1800202059cf7e0294db5d57755147304e6eb220a9277526dbe6842bde2",
+ "name": "gluegen-rt-2.3.2-natives-linux-amd64.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-amd64.jar",
+ "size": "4149"
+ },
+ {
+ "hash": "1365d463f98c0abec92f3ad6b35aa4b53a9599a517800cf99fdabea6712ca7ec",
+ "name": "gluegen-rt-2.3.2-natives-linux-i586.jar",
+ "path": "https://mvn.runelite.net/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2-natives-linux-i586.jar",
+ "size": "4130"
+ },
+ {
+ "hash": "7b7ae00e2aa98c3b2b5ac76e793e2c9b752bf51c86c54654dbd473843a25f1aa",
+ "name": "jbsdiff-1.0.jar",
+ "path": "https://mvn.runelite.net/io/sigpipe/jbsdiff/1.0/jbsdiff-1.0.jar",
+ "size": "24589"
+ },
+ {
+ "hash": "55bbfe26cee9296fd5b7c0d47ce6a00ea4dd572e235b63e9bb4eaf6f802315e4",
+ "name": "commons-compress-1.5.jar",
+ "path": "https://mvn.runelite.net/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar",
+ "size": "256241"
+ },
+ {
+ "hash": "fbc9de96a0cc193a125b4008dbc348e9ed54e5e13fc67b8ed40e645d303cc51b",
+ "name": "jna-4.5.1.jar",
+ "path": "https://mvn.runelite.net/net/java/dev/jna/jna/4.5.1/jna-4.5.1.jar",
+ "size": "1440662"
+ },
+ {
+ "hash": "84c8667555ee8dd91fef44b451419f6f16f71f727d5fc475a10c2663eba83abb",
+ "name": "jna-platform-4.5.1.jar",
+ "path": "https://mvn.runelite.net/net/java/dev/jna/jna-platform/4.5.1/jna-platform-4.5.1.jar",
+ "size": "2327547"
+ },
+ {
+ "hash": "440c629bec3905eb21dc5965fa38464f160a4cb8f87ca76806cdecc18b2c5992",
+ "name": "runelite-api-1.5.28-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/runelite-api-1.5.28-SNAPSHOT.jar",
+ "size": "1019717"
+ },
+ {
+ "hash": "45e3bcec9e7bae4ca2facd0fbee1f3da5e0700584e8419deed784a95255552c1",
+ "name": "runescape-api-1.5.28-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/runescape-api-1.5.28-SNAPSHOT.jar",
+ "size": "56079"
+ },
+ {
+ "hash": "811aadce9ce35ac638712da86123d4cb99570a9550614931471295cb26f91c36",
+ "name": "http-api-1.5.28-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/http-api-1.5.28-SNAPSHOT.jar",
+ "size": "101785"
+ },
+ {
+ "hash": "f55abda036da75e1af45bd43b9dfa79b2a3d90905be9cb38687c6621597a8165",
+ "name": "okhttp-3.7.0.jar",
+ "path": "https://mvn.runelite.net/com/squareup/okhttp3/okhttp/3.7.0/okhttp-3.7.0.jar",
+ "size": "394987"
+ },
+ {
+ "hash": "bfe7dfe483c37137966a1690f0c7d0b448ba217902c1fed202aaffdbba3291ae",
+ "name": "okio-1.12.0.jar",
+ "path": "https://mvn.runelite.net/com/squareup/okio/okio/1.12.0/okio-1.12.0.jar",
+ "size": "81088"
+ },
+ {
+ "hash": "9d4924588d6280c7516db3a4b7298306db5b6f0d1cdf568ce738309b5660f008",
+ "name": "commons-csv-1.4.jar",
+ "path": "https://mvn.runelite.net/org/apache/commons/commons-csv/1.4/commons-csv-1.4.jar",
+ "size": "39978"
+ },
+ {
+ "hash": "7e26a8d043418f2f22d5f6a3083a9a131817009ee8cd72c004e83b50d1849a7c",
+ "name": "discord-1.1.jar",
+ "path": "https://repo.runelite.net/net/runelite/discord/1.1/discord-1.1.jar",
+ "size": "617294"
+ },
+ {
+ "hash": "a3cab9293960d1d61968ce1591c87859ddcaa6cb2faca554cc938961c8fb3d3a",
+ "name": "injected-client-1.5.28-SNAPSHOT.jar",
+ "path": "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/injected-client-1.5.28-SNAPSHOT.jar",
+ "size": "2193046"
+ }
+ ],
+ "client": {
+ "artifactId": "client",
+ "classifier": "",
+ "extension": "jar",
+ "groupId": "net.runelite",
+ "properties": "",
+ "version": "1.5.28"
+ },
+ "clientJvm9Arguments": [
+ "-XX:+DisableAttachMechanism",
+ "-Xmx512m",
+ "-Xss2m",
+ "-XX:CompileThreshold=1500",
+ "-Djna.nosys=true"
+ ],
+ "clientJvmArguments": [
+ "-XX:+DisableAttachMechanism",
+ "-Xmx512m",
+ "-Xss2m",
+ "-XX:CompileThreshold=1500",
+ "-Xincgc",
+ "-XX:+UseConcMarkSweepGC",
+ "-XX:+UseParNewGC",
+ "-Djna.nosys=true"
+ ],
+ "launcherArguments": [
+ "-XX:+DisableAttachMechanism",
+ "-Drunelite.launcher.nojvm=true",
+ "-Xmx512m",
+ "-Xss2m",
+ "-XX:CompileThreshold=1500",
+ "-Xincgc",
+ "-XX:+UseConcMarkSweepGC",
+ "-XX:+UseParNewGC",
+ "-Djna.nosys=true"
+ ]
+}
\ No newline at end of file
diff --git a/cache-client/pom.xml b/cache-client/pom.xml
index ebe28ee8c8..59b213541f 100644
--- a/cache-client/pom.xml
+++ b/cache-client/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTcache-client
@@ -50,10 +50,14 @@
junitjunit
+ 4.12
+ testorg.slf4jslf4j-simple
+ 1.7.12
+ testnet.runelite
diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml
index eec033bd29..4eb3f28217 100644
--- a/cache-updater/pom.xml
+++ b/cache-updater/pom.xml
@@ -28,7 +28,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTCache Updater
@@ -36,7 +36,6 @@
1.5.6.RELEASE
- 5.1.45
@@ -59,7 +58,7 @@
mysqlmysql-connector-java
- ${mysql.connector.version}
+ 5.1.45net.runelite
@@ -69,10 +68,12 @@
org.sql2osql2o
+ 1.5.4io.miniominio
+ 3.0.6org.projectlombok
diff --git a/cache/pom.xml b/cache/pom.xml
index 6fd5d36c0f..9fd6153b3b 100644
--- a/cache/pom.xml
+++ b/cache/pom.xml
@@ -29,18 +29,16 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTcacheCache
- 1.3.1
- 1.10
- 4.6
-
165
+
+ 4.6
@@ -61,7 +59,7 @@
org.apache.commonscommons-compress
- ${commons.compress.version}
+ 1.10com.google.code.gson
@@ -70,6 +68,7 @@
io.nettynetty-buffer
+ 4.1.0.Finalorg.antlr
@@ -79,7 +78,7 @@
commons-clicommons-cli
- ${commons.cli.version}
+ 1.3.1org.projectlombok
@@ -90,10 +89,14 @@
junitjunit
+ 4.12
+ testorg.slf4jslf4j-simple
+ 1.7.12
+ testnet.runelite.rs
diff --git a/deobfuscator/pom.xml b/deobfuscator/pom.xml
index af5e2792b4..c711697622 100644
--- a/deobfuscator/pom.xml
+++ b/deobfuscator/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTdeobfuscator
diff --git a/http-api/pom.xml b/http-api/pom.xml
index 9727dc2642..ccd886a376 100644
--- a/http-api/pom.xml
+++ b/http-api/pom.xml
@@ -28,7 +28,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTWeb API
diff --git a/http-service/pom.xml b/http-service/pom.xml
index 5f06963aa8..b47299f9b2 100644
--- a/http-service/pom.xml
+++ b/http-service/pom.xml
@@ -28,7 +28,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTWeb Service
@@ -38,12 +38,6 @@
1.5.6.RELEASE1.2.0.Final
- 2.2.3
- 3.10.1
- 4.1.0
- 3.1.8
- 2.10.0
- 2.3.1
@@ -91,12 +85,13 @@
org.mariadb.jdbcmariadb-java-client
- ${maria.java.client.version}
+ 2.2.3providedorg.sql2osql2o
+ 1.5.4com.google.guava
@@ -109,16 +104,17 @@
com.github.scribejavascribejava-apis
- ${scribejava.apis.version}
+ 4.1.0io.miniominio
+ 3.0.6redis.clientsjedis
- ${redis.clients.version}
+ 2.10.0org.apache.commons
@@ -129,7 +125,7 @@
org.mongodbmongodb-driver-sync
- ${mongodb.driver.version}
+ 3.10.1
@@ -140,6 +136,8 @@
com.squareup.okhttp3mockwebserver
+ 3.7.0
+ testcom.h2database
@@ -190,13 +188,13 @@
com.github.kongchenswagger-maven-plugin
- ${swagger.maven.plugin.version}
+ 3.1.8javax.xml.bindjaxb-api
- ${jaxb.api.version}
+ 2.3.1
diff --git a/injected-client/pom.xml b/injected-client/pom.xml
index c8605a8c6d..474adda69b 100644
--- a/injected-client/pom.xml
+++ b/injected-client/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTinjected-client
@@ -37,23 +37,11 @@
- net.runelite
- client
+ net.runelite.rs
+ rs-client${project.version}true
-
- net.runelite.rs
- runescape-api
- ${project.version}
- false
-
-
- net.runelite
- runelite-api
- ${project.version}
- false
- net.runelite.rsvanilla
diff --git a/injector-plugin/pom.xml b/injector-plugin/pom.xml
index 38728b11e2..a80ce1afb3 100644
--- a/injector-plugin/pom.xml
+++ b/injector-plugin/pom.xml
@@ -30,7 +30,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTnet.runelite.rs
diff --git a/injector-plugin/src/main/java/net/runelite/injector/Inject.java b/injector-plugin/src/main/java/net/runelite/injector/Inject.java
index 3e24a55374..b228e55e5e 100644
--- a/injector-plugin/src/main/java/net/runelite/injector/Inject.java
+++ b/injector-plugin/src/main/java/net/runelite/injector/Inject.java
@@ -48,6 +48,7 @@ import net.runelite.deob.deobfuscators.arithmetic.DMath;
import net.runelite.injector.raw.ClearColorBuffer;
import net.runelite.injector.raw.DrawAfterWidgets;
import net.runelite.injector.raw.DrawMenu;
+import net.runelite.injector.raw.Occluder;
import net.runelite.injector.raw.RasterizerHook;
import net.runelite.injector.raw.RenderDraw;
import net.runelite.injector.raw.ScriptVM;
@@ -76,6 +77,7 @@ public class Inject
private final ScriptVM scriptVM = new ScriptVM(this);
private final ClearColorBuffer clearColorBuffer = new ClearColorBuffer(this);
private final RenderDraw renderDraw = new RenderDraw(this);
+ private final Occluder occluder = new Occluder(this);
// deobfuscated contains exports etc to apply to vanilla
private final ClassGroup deobfuscated, vanilla;
@@ -334,6 +336,7 @@ public class Inject
clearColorBuffer.inject();
renderDraw.inject();
drawMenu.inject();
+ occluder.inject();
}
private java.lang.Class injectInterface(ClassFile cf, ClassFile other)
diff --git a/injector-plugin/src/main/java/net/runelite/injector/InjectHookMethod.java b/injector-plugin/src/main/java/net/runelite/injector/InjectHookMethod.java
index 94303e81d3..be654e127d 100644
--- a/injector-plugin/src/main/java/net/runelite/injector/InjectHookMethod.java
+++ b/injector-plugin/src/main/java/net/runelite/injector/InjectHookMethod.java
@@ -192,7 +192,7 @@ public class InjectHookMethod
new net.runelite.asm.pool.Method(
new net.runelite.asm.pool.Class(vanillaMethod.getClassFile().getName()),
hookMethod.getName(),
- signature
+ hookMethod.getDescriptor()
)
);
}
diff --git a/injector-plugin/src/main/java/net/runelite/injector/raw/Occluder.java b/injector-plugin/src/main/java/net/runelite/injector/raw/Occluder.java
new file mode 100644
index 0000000000..9dc2c716a7
--- /dev/null
+++ b/injector-plugin/src/main/java/net/runelite/injector/raw/Occluder.java
@@ -0,0 +1,83 @@
+package net.runelite.injector.raw;
+
+import com.google.common.base.Stopwatch;
+import java.util.ListIterator;
+import net.runelite.asm.Method;
+import net.runelite.asm.attributes.Code;
+import net.runelite.asm.attributes.code.Instruction;
+import net.runelite.asm.attributes.code.Instructions;
+import net.runelite.asm.attributes.code.instructions.BiPush;
+import net.runelite.injector.Inject;
+import net.runelite.injector.InjectUtil;
+import net.runelite.injector.InjectionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Occluder
+{
+ private final Inject inject;
+ private static final Logger log = LoggerFactory.getLogger(Occluder.class);
+ private static final byte OLDVALUE = 25;
+ private static final byte NEWVALUE = 90;
+
+ public Occluder(Inject inject)
+ {
+ this.inject = inject;
+ }
+
+ public void inject() throws InjectionException
+ {
+ Stopwatch stopwatch = Stopwatch.createStarted();
+ Method occlude = InjectUtil.findMethod(inject, "occlude");
+ int replaced = 0;
+
+ if (occlude == null)
+ {
+ throw new InjectionException("Occlude couldn't be found");
+ }
+
+ Code code = occlude.getCode();
+
+ if (code == null)
+ {
+ throw new InjectionException("Occlude code was null");
+ }
+
+ Instructions ins = code.getInstructions();
+
+ ListIterator it = ins.getInstructions().listIterator();
+
+ while (it.hasNext())
+ {
+ Instruction i = it.next();
+
+ if (!(i instanceof BiPush))
+ {
+ continue;
+ }
+
+ boolean shouldChange = (byte) ((BiPush) i).getConstant() == OLDVALUE;
+
+ if (!shouldChange)
+ {
+ continue;
+ }
+
+ replaced++;
+
+ Instruction biPush = new BiPush(ins, NEWVALUE);
+
+ it.set(biPush);
+ }
+
+ stopwatch.stop();
+
+ if (replaced != 10)
+ {
+ throw new InjectionException("Only found " + replaced + " 25's to replace in occlude instead of expected 10");
+ }
+
+ log.info("Changed {} values in occlude()", replaced);
+ log.info("occluder took {}", stopwatch.toString());
+ }
+}
diff --git a/injector-plugin/src/main/java/net/runelite/injector/raw/RenderDraw.java b/injector-plugin/src/main/java/net/runelite/injector/raw/RenderDraw.java
index bef73b133f..0d559df9ca 100644
--- a/injector-plugin/src/main/java/net/runelite/injector/raw/RenderDraw.java
+++ b/injector-plugin/src/main/java/net/runelite/injector/raw/RenderDraw.java
@@ -17,7 +17,7 @@ import org.slf4j.LoggerFactory;
public class RenderDraw
{
- private static final Logger log = LoggerFactory.getLogger(ClearColorBuffer.class);
+ private static final Logger log = LoggerFactory.getLogger(RenderDraw.class);
private static final net.runelite.asm.pool.Method renderDraw = new net.runelite.asm.pool.Method(
new Class("net.runelite.client.callback.Hooks"),
"renderDraw",
diff --git a/pom.xml b/pom.xml
index b404ec6e40..6a41755b67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTpomRuneLite
@@ -302,9 +302,7 @@
checkstyle.xml
- ${project.build.sourceDirectory}
- true
diff --git a/protocol-api/pom.xml b/protocol-api/pom.xml
index 574921c269..cb85d612f9 100644
--- a/protocol-api/pom.xml
+++ b/protocol-api/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTprotocol-api
@@ -58,6 +58,8 @@
junitjunit
+ 4.12
+ test
diff --git a/protocol/pom.xml b/protocol/pom.xml
index b02fe25c69..1e03da9e36 100644
--- a/protocol/pom.xml
+++ b/protocol/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTprotocol
@@ -54,6 +54,7 @@
io.nettynetty-all
+ 4.1.0.Finalorg.projectlombok
@@ -64,6 +65,8 @@
junitjunit
+ 4.12
+ test
diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml
index de7b43c940..bfcbf4c4a7 100644
--- a/runelite-api/pom.xml
+++ b/runelite-api/pom.xml
@@ -29,16 +29,12 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTrunelite-apiRuneLite API
-
- 1.3.9
-
-
org.slf4j
@@ -52,7 +48,7 @@
com.google.code.findbugsjsr305
- ${jsr305.version}
+ 1.3.9
diff --git a/runelite-api/src/main/java/net/runelite/api/AnimationID.java b/runelite-api/src/main/java/net/runelite/api/AnimationID.java
index c76971fbef..37e87d4e99 100644
--- a/runelite-api/src/main/java/net/runelite/api/AnimationID.java
+++ b/runelite-api/src/main/java/net/runelite/api/AnimationID.java
@@ -178,6 +178,7 @@ public final class AnimationID
public static final int BLACKJACK_KO = 838;
public static final int VETION_EARTHQUAKE = 5507;
public static final int ZULRAH_DEATH = 5804;
+ public static final int ZULRAH_PHASE = 5072;
// Farming
public static final int FARMING_HARVEST_FRUIT_TREE = 2280;
diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java
index b8bd992eae..6d4e38235b 100644
--- a/runelite-api/src/main/java/net/runelite/api/Client.java
+++ b/runelite-api/src/main/java/net/runelite/api/Client.java
@@ -934,7 +934,7 @@ public interface Client extends GameShell
*
* @return all projectiles
*/
- java.util.List getProjectiles();
+ List getProjectiles();
/**
* Gets a list of all graphics objects currently drawn.
@@ -1426,6 +1426,13 @@ public interface Client extends GameShell
*/
void setNPCsHidden(boolean state);
+ /**
+ * Sets which NPCs are hidden
+ *
+ * @param names the names of the npcs seperated by ','
+ */
+ void setNPCsNames(String names);
+
/**
* Sets whether 2D sprites (ie. overhead prayers) related to
* the NPCs are hidden.
@@ -1496,14 +1503,6 @@ public interface Client extends GameShell
*/
NodeCache getWidgetSpriteCache();
- /**
- * Overrides health bar sprites with the sprites from the specified override.
- * Pass in {@code null} to revert the health bars back to their default.
- *
- * @param override the health bar override
- */
- void setHealthBarOverride(HealthBarOverride override);
-
/**
* Gets the current server tick count.
*
@@ -1632,7 +1631,7 @@ public interface Client extends GameShell
void draw2010Menu();
- NodeCache getHealthBarCache();
+ void resetHealthBarCaches();
void setRenderSelf(boolean enabled);
diff --git a/runelite-api/src/main/java/net/runelite/api/Constants.java b/runelite-api/src/main/java/net/runelite/api/Constants.java
index 2d8ea3deed..bdcb8f6374 100644
--- a/runelite-api/src/main/java/net/runelite/api/Constants.java
+++ b/runelite-api/src/main/java/net/runelite/api/Constants.java
@@ -99,7 +99,19 @@ public class Constants
public static final int GAME_TICK_LENGTH = 600;
/**
- * Used when getting High Alchemy value - multiplied by general store price.
+ * High alchemy = shop price * HIGH_ALCHEMY_MULTIPLIER
+ *
+ * @see ItemDefinition#getPrice
*/
- public static final float HIGH_ALCHEMY_CONSTANT = 0.6f;
+ public static final float HIGH_ALCHEMY_MULTIPLIER = 0.6f;
+
+ /**
+ * Width of a standard item sprite
+ */
+ public static final int ITEM_SPRITE_WIDTH = 36;
+
+ /**
+ * Height of a standard item sprite
+ */
+ public static final int ITEM_SPRITE_HEIGHT = 32;
}
diff --git a/runelite-api/src/main/java/net/runelite/api/DynamicObject.java b/runelite-api/src/main/java/net/runelite/api/DynamicObject.java
new file mode 100644
index 0000000000..a1914605e3
--- /dev/null
+++ b/runelite-api/src/main/java/net/runelite/api/DynamicObject.java
@@ -0,0 +1,6 @@
+package net.runelite.api;
+
+public interface DynamicObject extends Renderable
+{
+ int getAnimationID();
+}
diff --git a/runelite-api/src/main/java/net/runelite/api/GraphicID.java b/runelite-api/src/main/java/net/runelite/api/GraphicID.java
index 17b47c4224..79ffd07145 100644
--- a/runelite-api/src/main/java/net/runelite/api/GraphicID.java
+++ b/runelite-api/src/main/java/net/runelite/api/GraphicID.java
@@ -52,5 +52,7 @@ public class GraphicID
public static final int FLYING_FISH = 1387;
public static final int OLM_BURN = 1351;
public static final int OLM_TELEPORT = 1359;
+ public static final int OLM_HEAL = 1363;
+ public static final int OLM_CRYSTAL = 1447;
public static final int XERIC_TELEPORT = 1612;
}
diff --git a/runelite-api/src/main/java/net/runelite/api/HealthBar.java b/runelite-api/src/main/java/net/runelite/api/HealthBar.java
index 0d37e01c2a..89717b1435 100644
--- a/runelite-api/src/main/java/net/runelite/api/HealthBar.java
+++ b/runelite-api/src/main/java/net/runelite/api/HealthBar.java
@@ -30,5 +30,7 @@ public interface HealthBar
Sprite getHealthBarBackSprite();
+ int getHealthBarFrontSpriteId();
+
void setPadding(int padding);
}
diff --git a/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java b/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java
deleted file mode 100644
index e6d213e750..0000000000
--- a/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2019, Lotto
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package net.runelite.api;
-
-import lombok.Data;
-
-@Data
-public class HealthBarOverride
-{
- public final Sprite frontSprite;
- public final Sprite backSprite;
- public final Sprite frontSpriteLarge;
- public final Sprite backSpriteLarge;
-}
diff --git a/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java b/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java
index ece176145f..373d066fb9 100644
--- a/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java
+++ b/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java
@@ -63,6 +63,8 @@ public interface ItemDefinition
* alchemy values, respectively.
*
* @return the general store value of the item
+ *
+ * @see Constants#HIGH_ALCHEMY_MULTIPLIER
*/
int getPrice();
diff --git a/runelite-api/src/main/java/net/runelite/api/ItemID.java b/runelite-api/src/main/java/net/runelite/api/ItemID.java
index 813c354a01..ab3252792a 100644
--- a/runelite-api/src/main/java/net/runelite/api/ItemID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java
@@ -10791,5 +10791,35 @@ public final class ItemID
public static final int TORMENTED_BRACELET_OR = 23444;
public static final int GIANT_EASTER_EGG = 23446;
public static final int BUNNYMAN_MASK = 23448;
+ public static final int ENCHANTED_LYREI = 23458;
+ public static final int ATTACKER_ICON_23460 = 23460;
+ public static final int ATTACKER_ICON_23461 = 23461;
+ public static final int ATTACKER_ICON_23462 = 23462;
+ public static final int ATTACKER_ICON_23463 = 23463;
+ public static final int ATTACKER_ICON_23464 = 23464;
+ public static final int ATTACKER_ICON_23465 = 23465;
+ public static final int DEFENDER_ICON_23466 = 23466;
+ public static final int DEFENDER_ICON_23467 = 23467;
+ public static final int DEFENDER_ICON_23468 = 23468;
+ public static final int DEFENDER_ICON_23469 = 23469;
+ public static final int DEFENDER_ICON_23470 = 23470;
+ public static final int COLLECTOR_ICON_23471 = 23471;
+ public static final int COLLECTOR_ICON_23472 = 23472;
+ public static final int COLLECTOR_ICON_23473 = 23473;
+ public static final int COLLECTOR_ICON_23474 = 23474;
+ public static final int COLLECTOR_ICON_23475 = 23475;
+ public static final int COLLECTOR_ICON_23476 = 23476;
+ public static final int COLLECTOR_ICON_23477 = 23477;
+ public static final int HEALER_ICON_23478 = 23478;
+ public static final int HEALER_ICON_23479 = 23479;
+ public static final int HEALER_ICON_23480 = 23480;
+ public static final int HEALER_ICON_23481 = 23481;
+ public static final int HEALER_ICON_23482 = 23482;
+ public static final int HEALER_ICON_23483 = 23483;
+ public static final int HEALER_ICON_23484 = 23484;
+ public static final int HEALER_ICON_23485 = 23485;
+ public static final int HEALER_ICON_23486 = 23486;
+ public static final int WINE_OF_ZAMORAK_23489 = 23489;
+ public static final int LARRANS_KEY = 23490;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/NpcID.java b/runelite-api/src/main/java/net/runelite/api/NpcID.java
index 1ab55200fd..1288a33ba7 100644
--- a/runelite-api/src/main/java/net/runelite/api/NpcID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java
@@ -460,10 +460,9 @@ public final class NpcID
public static final int SKELETAL_WYVERN_468 = 468;
public static final int KILLERWATT = 469;
public static final int KILLERWATT_470 = 470;
- public static final int FUNGI = 471;
- public static final int FUNGI_472 = 472;
- public static final int ZYGOMITE = 473;
- public static final int ZYGOMITE_474 = 474;
+ public static final int DARK_WIZARD = 472;
+ public static final int INVRIGAR_THE_NECROMANCER = 473;
+ public static final int DARK_WIZARD_474 = 474;
public static final int HOLE_IN_THE_WALL = 475;
public static final int WALL_BEAST = 476;
public static final int GIANT_FROG = 477;
@@ -493,40 +492,37 @@ public final class NpcID
public static final int VANESSA = 502;
public static final int RICHARD = 503;
public static final int ALICE = 504;
- public static final int BOB = 505;
- public static final int SHOP_KEEPER = 506;
- public static final int SHOP_ASSISTANT = 507;
- public static final int SHOP_KEEPER_508 = 508;
- public static final int SHOP_ASSISTANT_509 = 509;
- public static final int SHOP_KEEPER_510 = 510;
- public static final int SHOP_ASSISTANT_511 = 511;
- public static final int SHOP_KEEPER_512 = 512;
- public static final int SHOP_ASSISTANT_513 = 513;
- public static final int SHOP_KEEPER_514 = 514;
- public static final int SHOP_ASSISTANT_515 = 515;
- public static final int SHOP_KEEPER_516 = 516;
- public static final int SHOP_ASSISTANT_517 = 517;
- public static final int SHOP_KEEPER_518 = 518;
- public static final int SHOP_ASSISTANT_519 = 519;
- public static final int FAIRY_SHOP_KEEPER = 520;
- public static final int FAIRY_SHOP_ASSISTANT = 521;
- public static final int VALAINE = 522;
- public static final int SCAVVO = 523;
- public static final int PEKSA = 524;
- public static final int SILK_TRADER = 525;
- public static final int GEM_TRADER = 526;
- public static final int ZEKE = 527;
- public static final int LOUIE_LEGS = 528;
- public static final int KARIM = 529;
- public static final int RANAEL = 530;
- public static final int DOMMIK = 531;
- public static final int ZAFF = 532;
- public static final int BARAEK = 533;
+ public static final int MUGGER = 505;
+ public static final int WITCH = 506;
+ public static final int WITCH_507 = 507;
+ public static final int BLACK_KNIGHT = 508;
+ public static final int BLACK_KNIGHT_509 = 509;
+ public static final int HIGHWAYMAN = 510;
+ public static final int HIGHWAYMAN_511 = 511;
+ public static final int CHAOS_DRUID = 512;
+ public static final int PIRATE = 513;
+ public static final int PIRATE_514 = 514;
+ public static final int PIRATE_515 = 515;
+ public static final int PIRATE_516 = 516;
+ public static final int THUG = 517;
+ public static final int ROGUE = 518;
+ public static final int MONK_OF_ZAMORAK = 519;
+ public static final int MONK_OF_ZAMORAK_520 = 520;
+ public static final int MONK_OF_ZAMORAK_521 = 521;
+ public static final int TRIBESMAN = 522;
+ public static final int DARK_WARRIOR = 523;
+ public static final int CHAOS_DRUID_WARRIOR = 524;
+ public static final int NECROMANCER = 525;
+ public static final int BANDIT = 526;
+ public static final int GUARD_BANDIT = 527;
+ public static final int BARBARIAN_GUARD = 528;
+ public static final int PORTAL = 530;
+ public static final int PORTAL_532 = 532;
+ public static final int FUNGI = 533;
public static final int THESSALIA = 534;
- public static final int HORVIK = 535;
- public static final int LOWE = 536;
- public static final int SHOP_KEEPER_537 = 537;
- public static final int SHOP_ASSISTANT_538 = 538;
+ public static final int FUNGI_535 = 535;
+ public static final int ZYGOMITE = 537;
+ public static final int FUNGI_538 = 538;
public static final int ELFINLOCKS = 539;
public static final int CLOCKWORK_CAT = 540;
public static final int CLOCKWORK_CAT_541 = 541;
@@ -625,7 +621,7 @@ public final class NpcID
public static final int BREWER_634 = 634;
public static final int FISHING_SPOT = 635;
public static final int KARAMTHULHU = 636;
- public static final int AUBURY = 637;
+ public static final int FUNGI_637 = 637;
public static final int ELF_TRACKER = 638;
public static final int TYRAS_GUARD = 639;
public static final int UG = 640;
@@ -678,7 +674,7 @@ public final class NpcID
public static final int BARTENDER = 687;
public static final int EBLIS = 688;
public static final int EBLIS_689 = 689;
- public static final int BANDIT = 690;
+ public static final int BANDIT_690 = 690;
public static final int BANDIT_691 = 691;
public static final int BANDIT_692 = 692;
public static final int BANDIT_693 = 693;
@@ -992,37 +988,34 @@ public final class NpcID
public static final int RAT = 1020;
public static final int RAT_1021 = 1021;
public static final int RAT_1022 = 1022;
- public static final int FANCY_DRESS_SHOP_OWNER = 1023;
- public static final int SHOP_KEEPER_1024 = 1024;
- public static final int GRUM = 1025;
- public static final int WYDIN = 1026;
- public static final int GERRANT = 1027;
- public static final int BRIAN = 1028;
- public static final int JIMINUA = 1029;
- public static final int SHOP_KEEPER_1030 = 1030;
- public static final int CANDLE_MAKER = 1031;
- public static final int ARHEIN = 1032;
- public static final int JUKAT = 1033;
- public static final int LUNDERWIN = 1034;
- public static final int IRKSOL = 1035;
- public static final int FAIRY = 1036;
- public static final int ZAMBO = 1037;
- public static final int SILVER_MERCHANT = 1038;
- public static final int GEM_MERCHANT = 1039;
- public static final int BAKER = 1040;
- public static final int SPICE_SELLER = 1041;
- public static final int FUR_TRADER = 1042;
- public static final int SILK_MERCHANT = 1043;
- public static final int HICKTON = 1044;
- public static final int HARRY = 1045;
- public static final int CASSIE = 1046;
- public static final int FRINCOS = 1047;
- public static final int DROGO_DWARF = 1048;
- public static final int FLYNN = 1049;
- public static final int WAYNE = 1050;
- public static final int DWARF_1051 = 1051;
- public static final int BETTY = 1052;
- public static final int HERQUIN = 1053;
+ public static final int ZYGOMITE_1024 = 1024;
+ public static final int BANKER_1027 = 1027;
+ public static final int BANKER_1028 = 1028;
+ public static final int BANKER_1029 = 1029;
+ public static final int BANKER_1030 = 1030;
+ public static final int BANKER_1031 = 1031;
+ public static final int BANKER_1032 = 1032;
+ public static final int BANKER_1033 = 1033;
+ public static final int BANKER_1034 = 1034;
+ public static final int BANKER_1035 = 1035;
+ public static final int BANKER_1036 = 1036;
+ public static final int SNAKE = 1037;
+ public static final int MONKEY_1038 = 1038;
+ public static final int ALBINO_BAT = 1039;
+ public static final int CRAB = 1040;
+ public static final int GIANT_MOSQUITO = 1041;
+ public static final int JUNGLE_HORROR = 1042;
+ public static final int JUNGLE_HORROR_1043 = 1043;
+ public static final int JUNGLE_HORROR_1044 = 1044;
+ public static final int JUNGLE_HORROR_1045 = 1045;
+ public static final int JUNGLE_HORROR_1046 = 1046;
+ public static final int CAVE_HORROR = 1047;
+ public static final int CAVE_HORROR_1048 = 1048;
+ public static final int CAVE_HORROR_1049 = 1049;
+ public static final int CAVE_HORROR_1050 = 1050;
+ public static final int CAVE_HORROR_1051 = 1051;
+ public static final int CAVEY_DAVEY = 1052;
+ public static final int PATCHY = 1053;
public static final int LAUNA = 1054;
public static final int LAUNA_1055 = 1055;
public static final int BRANA = 1056;
@@ -1134,13 +1127,12 @@ public final class NpcID
public static final int MONK_OF_ENTRANA_1169 = 1169;
public static final int MONK_OF_ENTRANA_1170 = 1170;
public static final int MONK_1171 = 1171;
- public static final int ROMMIK = 1172;
- public static final int GAIUS = 1173;
- public static final int JATIX = 1174;
- public static final int DAVON = 1175;
- public static final int ZENESHA = 1176;
- public static final int AEMAD = 1177;
- public static final int KORTAN = 1178;
+ public static final int CHICKEN = 1173;
+ public static final int CHICKEN_1174 = 1174;
+ public static final int ROOSTER = 1175;
+ public static final int LIL_LAMB = 1176;
+ public static final int LAMB = 1177;
+ public static final int SHEEP_1178 = 1178;
public static final int LUMBRIDGE_GUIDE_1179 = 1179;
public static final int LUMBRIDGE_GUIDE_1181 = 1181;
public static final int ___ = 1182;
@@ -1252,17 +1244,17 @@ public final class NpcID
public static final int MORTTON_LOCAL_1296 = 1296;
public static final int AFFLICTED_1297 = 1297;
public static final int AFFLICTED_1298 = 1298;
- public static final int ROACHEY = 1299;
- public static final int FRENITA = 1300;
- public static final int NURMOF = 1301;
- public static final int TEA_SELLER = 1302;
- public static final int FAT_TONY = 1303;
- public static final int NOTERAZZO = 1304;
+ public static final int SHEEP_1299 = 1299;
+ public static final int SHEEP_1300 = 1300;
+ public static final int SHEEP_1301 = 1301;
+ public static final int SHEEP_1302 = 1302;
+ public static final int SHEEP_1303 = 1303;
+ public static final int SHEEP_1304 = 1304;
public static final int HAIRDRESSER = 1305;
public static final int MAKEOVER_MAGE = 1306;
public static final int MAKEOVER_MAGE_1307 = 1307;
- public static final int DIANGO = 1308;
- public static final int BRIAN_1309 = 1309;
+ public static final int SHEEP_1308 = 1308;
+ public static final int SHEEP_1309 = 1309;
public static final int BARTENDER_1310 = 1310;
public static final int BARTENDER_1311 = 1311;
public static final int BARTENDER_1312 = 1312;
@@ -1392,12 +1384,12 @@ public final class NpcID
public static final int DAERO = 1444;
public static final int DAERO_1445 = 1445;
public static final int WAYDAR = 1446;
- public static final int PIRATE = 1447;
+ public static final int PIRATE_1447 = 1447;
public static final int THIEF = 1448;
public static final int LUMDO_1453 = 1453;
public static final int LUMDO_1454 = 1454;
public static final int GLO_CARANOCK = 1460;
- public static final int MUGGER = 1461;
+ public static final int MUGGER_1461 = 1461;
public static final int SMALL_NINJA_MONKEY = 1462;
public static final int MEDIUM_NINJA_MONKEY = 1463;
public static final int GORILLA = 1464;
@@ -1478,7 +1470,7 @@ public final class NpcID
public static final int FISHING_SPOT_1542 = 1542;
public static final int GARGOYLE_1543 = 1543;
public static final int FISHING_SPOT_1544 = 1544;
- public static final int BLACK_KNIGHT = 1545;
+ public static final int BLACK_KNIGHT_1545 = 1545;
public static final int GUARD_1546 = 1546;
public static final int GUARD_1547 = 1547;
public static final int GUARD_1548 = 1548;
@@ -1486,7 +1478,7 @@ public final class NpcID
public static final int GUARD_1550 = 1550;
public static final int GUARD_1551 = 1551;
public static final int GUARD_1552 = 1552;
- public static final int CRAB = 1553;
+ public static final int CRAB_1553 = 1553;
public static final int SEAGULL_1554 = 1554;
public static final int SEAGULL_1555 = 1555;
public static final int FIRE_WIZARD = 1556;
@@ -1668,7 +1660,7 @@ public final class NpcID
public static final int BRAWLER_1736 = 1736;
public static final int BRAWLER_1737 = 1737;
public static final int BRAWLER_1738 = 1738;
- public static final int PORTAL = 1739;
+ public static final int PORTAL_1739 = 1739;
public static final int PORTAL_1740 = 1740;
public static final int PORTAL_1741 = 1741;
public static final int PORTAL_1742 = 1742;
@@ -1716,10 +1708,10 @@ public final class NpcID
public static final int SKELETON_1785 = 1785;
public static final int GHOST_1786 = 1786;
public static final int SKELETON_MAGE_1787 = 1787;
- public static final int BETTY_1788 = 1788;
- public static final int GRUM_1789 = 1789;
- public static final int GERRANT_1790 = 1790;
- public static final int WYDIN_1791 = 1791;
+ public static final int BETTY = 1788;
+ public static final int GRUM = 1789;
+ public static final int GERRANT = 1790;
+ public static final int WYDIN = 1791;
public static final int GOAT = 1792;
public static final int GOAT_1793 = 1793;
public static final int BILLY_GOAT = 1794;
@@ -1767,7 +1759,7 @@ public final class NpcID
public static final int STAG = 1845;
public static final int WOOD_DRYAD = 1846;
public static final int FAIRY_VERY_WISE = 1847;
- public static final int FAIRY_1848 = 1848;
+ public static final int FAIRY = 1848;
public static final int FAIRY_1849 = 1849;
public static final int FAIRY_1850 = 1850;
public static final int FAIRY_1851 = 1851;
@@ -1915,7 +1907,7 @@ public final class NpcID
public static final int FRITZ_THE_GLASSBLOWER = 2053;
public static final int CHAOS_ELEMENTAL = 2054;
public static final int CHAOS_ELEMENTAL_JR = 2055;
- public static final int DARK_WIZARD = 2056;
+ public static final int DARK_WIZARD_2056 = 2056;
public static final int DARK_WIZARD_2057 = 2057;
public static final int DARK_WIZARD_2058 = 2058;
public static final int DARK_WIZARD_2059 = 2059;
@@ -2488,7 +2480,7 @@ public final class NpcID
public static final int LILIYA = 2632;
public static final int BANKER_2633 = 2633;
public static final int MYRE_BLAMISH_SNAIL = 2634;
- public static final int BOB_2635 = 2635;
+ public static final int BOB = 2635;
public static final int BOB_2636 = 2636;
public static final int SPHINX = 2637;
public static final int NEITE = 2638;
@@ -2544,11 +2536,12 @@ public final class NpcID
public static final int IMIAGO = 2688;
public static final int LILIWEN = 2689;
public static final int COOL_MOM227 = 2690;
- public static final int CHICKEN = 2692;
- public static final int CHICKEN_2693 = 2693;
- public static final int ROOSTER = 2694;
- public static final int LIL_LAMB = 2695;
- public static final int LAMB = 2696;
+ public static final int SHEEP_2691 = 2691;
+ public static final int SHEEP_2692 = 2692;
+ public static final int SHEEP_2693 = 2693;
+ public static final int SHEEP_2694 = 2694;
+ public static final int SHEEP_2695 = 2695;
+ public static final int SHEEP_2696 = 2696;
public static final int SHEEP_2697 = 2697;
public static final int SHEEP_2698 = 2698;
public static final int SHEEP_2699 = 2699;
@@ -2642,43 +2635,43 @@ public final class NpcID
public static final int SHEEP_2787 = 2787;
public static final int SHEEP_2788 = 2788;
public static final int SHEEP_2789 = 2789;
- public static final int SHEEP_2790 = 2790;
- public static final int SHEEP_2791 = 2791;
- public static final int SHEEP_2792 = 2792;
- public static final int SHEEP_2793 = 2793;
- public static final int SHEEP_2794 = 2794;
- public static final int SHEEP_2795 = 2795;
- public static final int SHEEP_2796 = 2796;
- public static final int SHEEP_2797 = 2797;
- public static final int SHEEP_2798 = 2798;
- public static final int SHEEP_2799 = 2799;
- public static final int SHEEP_2800 = 2800;
- public static final int SHEEP_2801 = 2801;
- public static final int SHEEP_2802 = 2802;
- public static final int SHEEP_2803 = 2803;
- public static final int SHEEP_2804 = 2804;
- public static final int COW = 2805;
- public static final int COW_2806 = 2806;
- public static final int COW_CALF = 2807;
- public static final int COW_2808 = 2808;
- public static final int COW_CALF_2809 = 2809;
- public static final int COW_2810 = 2810;
- public static final int PIG = 2811;
- public static final int PIG_2812 = 2812;
- public static final int PIGLET = 2813;
- public static final int PIGLET_2814 = 2814;
- public static final int PIGLET_2815 = 2815;
- public static final int COW_CALF_2816 = 2816;
- public static final int SHEEPDOG = 2817;
- public static final int ROOSTER_2818 = 2818;
- public static final int CHICKEN_2819 = 2819;
- public static final int CHICKEN_2820 = 2820;
- public static final int CHICKEN_2821 = 2821;
- public static final int PIG_2822 = 2822;
- public static final int PIG_2823 = 2823;
- public static final int PIGLET_2824 = 2824;
- public static final int PIGLET_2825 = 2825;
- public static final int PIGLET_2826 = 2826;
+ public static final int COW = 2790;
+ public static final int COW_2791 = 2791;
+ public static final int COW_CALF = 2792;
+ public static final int COW_2793 = 2793;
+ public static final int COW_CALF_2794 = 2794;
+ public static final int COW_2795 = 2795;
+ public static final int PIG = 2796;
+ public static final int PIG_2797 = 2797;
+ public static final int PIGLET = 2798;
+ public static final int PIGLET_2799 = 2799;
+ public static final int PIGLET_2800 = 2800;
+ public static final int COW_CALF_2801 = 2801;
+ public static final int SHEEPDOG = 2802;
+ public static final int ROOSTER_2803 = 2803;
+ public static final int CHICKEN_2804 = 2804;
+ public static final int CHICKEN_2805 = 2805;
+ public static final int CHICKEN_2806 = 2806;
+ public static final int PIG_2807 = 2807;
+ public static final int PIG_2808 = 2808;
+ public static final int PIGLET_2809 = 2809;
+ public static final int PIGLET_2810 = 2810;
+ public static final int PIGLET_2811 = 2811;
+ public static final int BOB_2812 = 2812;
+ public static final int SHOP_KEEPER = 2813;
+ public static final int SHOP_ASSISTANT = 2814;
+ public static final int SHOP_KEEPER_2815 = 2815;
+ public static final int SHOP_ASSISTANT_2816 = 2816;
+ public static final int SHOP_KEEPER_2817 = 2817;
+ public static final int SHOP_ASSISTANT_2818 = 2818;
+ public static final int SHOP_KEEPER_2819 = 2819;
+ public static final int SHOP_ASSISTANT_2820 = 2820;
+ public static final int SHOP_KEEPER_2821 = 2821;
+ public static final int SHOP_ASSISTANT_2822 = 2822;
+ public static final int SHOP_KEEPER_2823 = 2823;
+ public static final int SHOP_ASSISTANT_2824 = 2824;
+ public static final int SHOP_KEEPER_2825 = 2825;
+ public static final int SHOP_ASSISTANT_2826 = 2826;
public static final int BAT = 2827;
public static final int DRYAD = 2828;
public static final int FAIRY_2829 = 2829;
@@ -2697,7 +2690,7 @@ public final class NpcID
public static final int ICE_WARRIOR_2842 = 2842;
public static final int OTHERWORLDLY_BEING = 2843;
public static final int MAGIC_AXE = 2844;
- public static final int SNAKE = 2845;
+ public static final int SNAKE_2845 = 2845;
public static final int SKAVID = 2846;
public static final int YETI = 2847;
public static final int MONKEY_2848 = 2848;
@@ -2720,33 +2713,33 @@ public final class NpcID
public static final int DUNGEON_RAT = 2865;
public static final int DUNGEON_RAT_2866 = 2866;
public static final int DUNGEON_RAT_2867 = 2867;
- public static final int DARK_WIZARD_2868 = 2868;
- public static final int INVRIGAR_THE_NECROMANCER = 2869;
- public static final int DARK_WIZARD_2870 = 2870;
- public static final int MUGGER_2871 = 2871;
- public static final int WITCH = 2872;
- public static final int WITCH_2873 = 2873;
- public static final int BLACK_KNIGHT_2874 = 2874;
- public static final int BLACK_KNIGHT_2875 = 2875;
- public static final int HIGHWAYMAN = 2876;
- public static final int HIGHWAYMAN_2877 = 2877;
- public static final int CHAOS_DRUID = 2878;
- public static final int PIRATE_2879 = 2879;
- public static final int PIRATE_2880 = 2880;
- public static final int PIRATE_2881 = 2881;
- public static final int PIRATE_2882 = 2882;
- public static final int THUG = 2883;
- public static final int ROGUE = 2884;
- public static final int MONK_OF_ZAMORAK = 2885;
- public static final int MONK_OF_ZAMORAK_2886 = 2886;
- public static final int MONK_OF_ZAMORAK_2887 = 2887;
- public static final int TRIBESMAN = 2888;
- public static final int DARK_WARRIOR = 2889;
- public static final int CHAOS_DRUID_WARRIOR = 2890;
- public static final int NECROMANCER = 2891;
- public static final int BANDIT_2892 = 2892;
- public static final int GUARD_BANDIT = 2893;
- public static final int BARBARIAN_GUARD = 2894;
+ public static final int FAIRY_SHOP_KEEPER = 2868;
+ public static final int FAIRY_SHOP_ASSISTANT = 2869;
+ public static final int VALAINE = 2870;
+ public static final int SCAVVO = 2871;
+ public static final int PEKSA = 2872;
+ public static final int SILK_TRADER = 2873;
+ public static final int GEM_TRADER = 2874;
+ public static final int ZEKE = 2875;
+ public static final int LOUIE_LEGS = 2876;
+ public static final int KARIM = 2877;
+ public static final int RANAEL = 2878;
+ public static final int DOMMIK = 2879;
+ public static final int ZAFF = 2880;
+ public static final int BARAEK = 2881;
+ public static final int HORVIK = 2882;
+ public static final int LOWE = 2883;
+ public static final int SHOP_KEEPER_2884 = 2884;
+ public static final int SHOP_ASSISTANT_2885 = 2885;
+ public static final int AUBURY = 2886;
+ public static final int FANCY_DRESS_SHOP_OWNER = 2887;
+ public static final int SHOP_KEEPER_2888 = 2888;
+ public static final int GRUM_2889 = 2889;
+ public static final int WYDIN_2890 = 2890;
+ public static final int GERRANT_2891 = 2891;
+ public static final int BRIAN = 2892;
+ public static final int JIMINUA = 2893;
+ public static final int SHOP_KEEPER_2894 = 2894;
public static final int COOK_2895 = 2895;
public static final int COOK_2896 = 2896;
public static final int BANKER_2897 = 2897;
@@ -3022,23 +3015,23 @@ public final class NpcID
public static final int EMERALD_BENEDICT = 3194;
public static final int SPIN_BLADES = 3195;
public static final int SPIN_BLADES_3196 = 3196;
- public static final int SNAKE_3199 = 3199;
- public static final int MONKEY_3200 = 3200;
- public static final int ALBINO_BAT = 3201;
- public static final int CRAB_3202 = 3202;
- public static final int GIANT_MOSQUITO = 3203;
- public static final int JUNGLE_HORROR = 3204;
- public static final int JUNGLE_HORROR_3205 = 3205;
- public static final int JUNGLE_HORROR_3206 = 3206;
- public static final int JUNGLE_HORROR_3207 = 3207;
- public static final int JUNGLE_HORROR_3208 = 3208;
- public static final int CAVE_HORROR = 3209;
- public static final int CAVE_HORROR_3210 = 3210;
- public static final int CAVE_HORROR_3211 = 3211;
- public static final int CAVE_HORROR_3212 = 3212;
- public static final int CAVE_HORROR_3213 = 3213;
- public static final int CAVEY_DAVEY = 3214;
- public static final int PATCHY = 3215;
+ public static final int CANDLE_MAKER = 3199;
+ public static final int ARHEIN = 3200;
+ public static final int JUKAT = 3201;
+ public static final int LUNDERWIN = 3202;
+ public static final int IRKSOL = 3203;
+ public static final int FAIRY_3204 = 3204;
+ public static final int ZAMBO = 3205;
+ public static final int SILVER_MERCHANT = 3206;
+ public static final int GEM_MERCHANT = 3207;
+ public static final int BAKER = 3208;
+ public static final int SPICE_SELLER = 3209;
+ public static final int FUR_TRADER = 3210;
+ public static final int SILK_MERCHANT = 3211;
+ public static final int HICKTON = 3212;
+ public static final int HARRY = 3213;
+ public static final int CASSIE = 3214;
+ public static final int FRINCOS = 3215;
public static final int MELEE_COMBAT_TUTOR = 3216;
public static final int RANGED_COMBAT_TUTOR = 3217;
public static final int MAGIC_COMBAT_TUTOR = 3218;
@@ -4354,7 +4347,7 @@ public final class NpcID
public static final int GEM_MERCHANT_4581 = 4581;
public static final int SILVER_MERCHANT_4582 = 4582;
public static final int SILK_MERCHANT_4583 = 4583;
- public static final int ZENESHA_4584 = 4584;
+ public static final int ZENESHA = 4584;
public static final int ALI_MORRISANE_4585 = 4585;
public static final int GRIMESQUIT = 4586;
public static final int PHINGSPET = 4587;
@@ -5591,11 +5584,11 @@ public final class NpcID
public static final int TZREKJAD = 5892;
public static final int TZREKJAD_5893 = 5893;
public static final int BAST = 5894;
- public static final int BANKER_5895 = 5895;
- public static final int BANKER_5896 = 5896;
- public static final int BANKER_5897 = 5897;
- public static final int BANKER_5904 = 5904;
- public static final int BANKER_5905 = 5905;
+ public static final int DROGO_DWARF = 5895;
+ public static final int FLYNN = 5896;
+ public static final int WAYNE = 5897;
+ public static final int DWARF_5904 = 5904;
+ public static final int BETTY_5905 = 5905;
public static final int PROBITA = 5906;
public static final int CHAOS_ELEMENTAL_JR_5907 = 5907;
public static final int ABYSSAL_SIRE_5908 = 5908;
@@ -6021,8 +6014,8 @@ public final class NpcID
public static final int FIDELIO = 6525;
public static final int SBOTT = 6526;
public static final int ROAVAR = 6527;
- public static final int BANKER_6529 = 6529;
- public static final int BANKER_6530 = 6530;
+ public static final int HERQUIN = 6529;
+ public static final int ROMMIK = 6530;
public static final int BLURBERRY = 6531;
public static final int BARMAN_6532 = 6532;
public static final int ROMILY_WEAKLAX = 6533;
@@ -7135,7 +7128,7 @@ public final class NpcID
public static final int ANCIENT_WYVERN = 7795;
public static final int LOBSTROSITY = 7796;
public static final int ANCIENT_ZYGOMITE = 7797;
- public static final int ANCIENT_FUNGI = 7798;
+ public static final int GAIUS = 7798;
public static final int AMMONITE_CRAB = 7799;
public static final int FOSSIL_ROCK = 7800;
public static final int TAR_BUBBLES = 7801;
@@ -7745,7 +7738,7 @@ public final class NpcID
public static final int TRAPPED_SOUL_HARD = 8529;
public static final int AMELIA_8530 = 8530;
public static final int ALLANNA = 8531;
- public static final int LEKE_QUO_KERAN = 8532;
+ public static final int JATIX = 8532;
public static final int NIKKIE = 8533;
public static final int ROSIE = 8534;
public static final int ALAN = 8535;
@@ -7855,11 +7848,23 @@ public final class NpcID
public static final int ILFEEN_8677 = 8677;
public static final int FERAL_VAMPYRE_8678 = 8678;
public static final int ABIDOR_CRANK_8679 = 8679;
- public static final int BANKER_8680 = 8680;
- public static final int BANKER_8681 = 8681;
- public static final int BANKER_8682 = 8682;
- public static final int PORTAL_8684 = 8684;
- public static final int PORTAL_8686 = 8686;
+ public static final int DAVON = 8680;
+ public static final int ZENESHA_8681 = 8681;
+ public static final int AEMAD = 8682;
+ public static final int KORTAN = 8683;
+ public static final int ROACHEY = 8684;
+ public static final int FRENITA = 8685;
+ public static final int NURMOF = 8686;
+ public static final int TEA_SELLER = 8687;
+ public static final int FAT_TONY = 8688;
+ public static final int ANCIENT_FUNGI = 8690;
+ public static final int ANCIENT_FUNGI_8691 = 8691;
+ public static final int NOTERAZZO = 8692;
+ public static final int DIANGO = 8693;
+ public static final int BRIAN_8694 = 8694;
public static final int MOSOL_REI_8696 = 8696;
+ public static final int LEKE_QUO_KERAN = 8697;
+ public static final int MONK_OF_ZAMORAK_8698 = 8698;
+ public static final int LARRAN = 8699;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/NullItemID.java b/runelite-api/src/main/java/net/runelite/api/NullItemID.java
index 1bc9028389..f31d40f26e 100644
--- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java
@@ -12456,5 +12456,12 @@ public final class NullItemID
public static final int NULL_23455 = 23455;
public static final int NULL_23456 = 23456;
public static final int NULL_23457 = 23457;
+ public static final int NULL_23459 = 23459;
+ public static final int NULL_23487 = 23487;
+ public static final int NULL_23488 = 23488;
+ public static final int NULL_23491 = 23491;
+ public static final int NULL_23492 = 23492;
+ public static final int NULL_23493 = 23493;
+ public static final int NULL_23494 = 23494;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java
index 279f795689..103bf0143c 100644
--- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java
@@ -16209,5 +16209,7 @@ public final class NullObjectID
public static final int NULL_34823 = 34823;
public static final int NULL_34824 = 34824;
public static final int NULL_34825 = 34825;
+ public static final int NULL_34831 = 34831;
+ public static final int NULL_34832 = 34832;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/ObjectID.java b/runelite-api/src/main/java/net/runelite/api/ObjectID.java
index e31bd024d8..9d5ee32bfb 100644
--- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java
@@ -16133,7 +16133,7 @@ public final class ObjectID
public static final int GRAND_EXCHANGE_BOOTH_30390 = 30390;
public static final int IRON_LADDER_30391 = 30391;
public static final int IRON_LADDER_30392 = 30392;
- public static final int JADFEST_PORTAL = 30395;
+ public static final int MYSTERIOUS_POOL = 30395;
public static final int SHIMMERING_BARRIER_30396 = 30396;
public static final int SHIMMERING_BARRIER_30397 = 30397;
public static final int SHIMMERING_BARRIER_30398 = 30398;
@@ -17528,7 +17528,7 @@ public final class ObjectID
public static final int FIRE_OF_DEHUMIDIFICATION = 33322;
public static final int PILE_OF_RUBBLE_33340 = 33340;
public static final int PILE_OF_RUBBLE_33341 = 33341;
- public static final int HUB_PORTAL = 33343;
+ public static final int LARRANS_SMALL_CHEST = 33343;
public static final int BROKEN_WALL_33344 = 33344;
public static final int PORTAL_NEXUS_SPACE = 33346;
public static final int RUG_SPACE_33347 = 33347;
@@ -18605,5 +18605,10 @@ public final class ObjectID
public static final int RUBBLE_34803 = 34803;
public static final int RUBBLE_34804 = 34804;
public static final int RUBBLE_34805 = 34805;
+ public static final int JADFEST_PORTAL = 34826;
+ public static final int HUB_PORTAL = 34827;
+ public static final int LARRANS_SMALL_CHEST_34828 = 34828;
+ public static final int LARRANS_BIG_CHEST = 34829;
+ public static final int LARRANS_BIG_CHEST_34830 = 34830;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java
index 12774bf1b9..62acbe1454 100644
--- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java
@@ -110,6 +110,16 @@ public final class ScriptID
*/
public static final int KEPT_LOST_ITEM_EXAMINE = 1603;
+ /**
+ * Displays the game messages when clicking on an item inside the Items Kept on Death interface
+ *
+ *
int (boolean) Item kept on death
+ *
int Item Quantity
+ *
String Item Name
+ *
+ */
+ public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
+
/**
* Checks the state of the given stash unit.
*
diff --git a/runelite-api/src/main/java/net/runelite/api/SpriteID.java b/runelite-api/src/main/java/net/runelite/api/SpriteID.java
index e83c268535..a0c35e0367 100644
--- a/runelite-api/src/main/java/net/runelite/api/SpriteID.java
+++ b/runelite-api/src/main/java/net/runelite/api/SpriteID.java
@@ -1564,9 +1564,28 @@ public final class SpriteID
public static final int MOBILE_FUNCTION_MODE_DISABLED = 1624;
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_1 = 1625;
public static final int MOBILE_YELLOW_TOUCH_ANIMATION_2 = 1626;
+ /* Unmapped: 1627~1707 */
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS_UNUSED = 1708;
+ /* Unmapped: 1709, 1710 */
public static final int TAB_MAGIC_SPELLBOOK_ARCEUUS = 1711;
public static final int BIG_ASS_GUTHIX_SPELL = 1774;
public static final int BIG_SUPERHEAT = 1800;
public static final int BIG_SPEC_TRANSFER = 1959;
+ /* Unmapped: 1712~2175 */
+ public static final int HEALTHBAR_DEFAULT_FRONT_30PX = 2176;
+ public static final int HEALTHBAR_DEFAULT_BACK_30PX = 2177;
+ public static final int HEALTHBAR_DEFAULT_FRONT_50PX = 2178;
+ public static final int HEALTHBAR_DEFAULT_BACK_50PX = 2179;
+ public static final int HEALTHBAR_DEFAULT_FRONT_60PX = 2180;
+ public static final int HEALTHBAR_DEFAULT_BACK_60PX = 2181;
+ public static final int HEALTHBAR_DEFAULT_FRONT_80PX = 2182;
+ public static final int HEALTHBAR_DEFAULT_BACK_80PX = 2183;
+ public static final int HEALTHBAR_DEFAULT_FRONT_100PX = 2184;
+ public static final int HEALTHBAR_DEFAULT_BACK_100PX = 2185;
+ public static final int HEALTHBAR_DEFAULT_FRONT_120PX = 2186;
+ public static final int HEALTHBAR_DEFAULT_BACK_120PX = 2187;
+ public static final int HEALTHBAR_DEFAULT_FRONT_140PX = 2188;
+ public static final int HEALTHBAR_DEFAULT_BACK_140PX = 2189;
+ public static final int HEALTHBAR_DEFAULT_FRONT_160PX = 2190;
+ public static final int HEALTHBAR_DEFAULT_BACK_160PX = 2191;
}
diff --git a/runelite-api/src/main/java/net/runelite/api/Varbits.java b/runelite-api/src/main/java/net/runelite/api/Varbits.java
index ec3d36114b..1d6709bc0a 100644
--- a/runelite-api/src/main/java/net/runelite/api/Varbits.java
+++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java
@@ -295,6 +295,15 @@ public enum Varbits
THEATRE_OF_BLOOD(6440),
BLOAT_DOOR(6447),
+ /**
+ * Theatre of Blood orb varbits each number stands for the player's health on a scale of 1-27 (I think), 0 hides the orb
+ */
+ THEATRE_OF_BLOOD_ORB_1(6442),
+ THEATRE_OF_BLOOD_ORB_2(6443),
+ THEATRE_OF_BLOOD_ORB_3(6444),
+ THEATRE_OF_BLOOD_ORB_4(6445),
+ THEATRE_OF_BLOOD_ORB_5(6446),
+
/**
* Nightmare Zone
*/
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 06ec983a12..17455503bc 100644
--- a/runelite-api/src/main/java/net/runelite/api/WorldType.java
+++ b/runelite-api/src/main/java/net/runelite/api/WorldType.java
@@ -113,4 +113,14 @@ public enum WorldType
{
return worldTypes.stream().anyMatch(PVP_WORLD_TYPES::contains);
}
+
+ /**
+ * Checks to see if a collection of WorlTypes is a Deadman Mode World
+ * @param worldTypes The List of world types for a world
+ * @return true if it is deadman, false otherwise
+ */
+ public static boolean isDeadmanWorld(final Collection worldTypes)
+ {
+ return worldTypes.stream().anyMatch(EnumSet.of(DEADMAN, DEADMAN_TOURNAMENT, SEASONAL_DEADMAN)::contains);
+ }
}
diff --git a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java
index 72733d768d..05081da7a2 100644
--- a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java
+++ b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java
@@ -56,7 +56,7 @@ public enum SlayerUnlock
TZHARR_ENABLE(18),
BOSS_ENABLE(19),
BLOODVELD_EXTEND(20),
- ABBERANT_SPECTRE_EXTEND(21),
+ ABERRANT_SPECTRE_EXTEND(21),
AVIANSIES_EXTEND(22),
MITHRIL_DRAGON_EXTEND(23),
CAVE_HORROR_EXTEND(24),
@@ -79,7 +79,7 @@ public enum SlayerUnlock
RUNE_DRAGON_EXTEND(41),
VORKATH_SLAYER_HELM(42),
FOSSIL_ISLAND_WYVERN_DISABLE(43, Varbits.FOSSIL_ISLAND_WYVERN_DISABLE),
- GROTESQUE_GARDIAN_DOUBLE_COUNT(44);
+ GROTESQUE_GUARDIAN_DOUBLE_COUNT(44);
private Varbits toggleVarbit;
diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java
index 6638b1326a..672dc24324 100644
--- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java
+++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java
@@ -149,6 +149,7 @@ public class WidgetID
public static final int BEGINNER_CLUE_MAP_NORTH_OF_FALADOR = 351;
public static final int BEGINNER_CLUE_MAP_WIZARDS_TOWER = 356;
public static final int SEED_BOX_GROUP_ID = 128;
+ public static final int ITEMS_KEPT_ON_DEATH_GROUP_ID = 4;
static class WorldMap
{
@@ -962,9 +963,9 @@ public class WidgetID
static final int ATTACK_RANGE = 59; // OUTDATED?
static final int BOUNTY_HUNTER_INFO = 19;
static final int KILLDEATH_RATIO = 15;
- static final int SKULL_CONTAINER = 62;
- static final int SAFE_ZONE = 64;
- static final int WILDERNESS_LEVEL = 67; // this can also be the Deadman Mode "Protection" text
+ static final int SKULL_CONTAINER = 61;
+ static final int SAFE_ZONE = 63;
+ static final int WILDERNESS_LEVEL = 66; // this can also be the Deadman Mode "Protection" text
}
static class KourendFavour
@@ -1047,12 +1048,13 @@ public class WidgetID
static class KeptOnDeath
{
static final int KEPT_ITEMS_CONTAINER = 18;
+ static final int KEPT_ITEMS_TEXT = 17;
+ static final int LOST_ITEMS_TEXT = 20;
static final int LOST_ITEMS_CONTAINER = 21;
static final int LOST_ITEMS_VALUE = 23;
static final int INFORMATION_CONTAINER = 29;
static final int MAX_ITEMS_KEPT_ON_DEATH = 30;
static final int SAFE_ZONE_CONTAINER = 31;
-
static final int CUSTOM_TEXT_CONTAINER = 33;
}
diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java
index bc666fad45..4a99733ec3 100644
--- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java
+++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java
@@ -739,7 +739,10 @@ public enum WidgetInfo
XP_DROP_4(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_4),
XP_DROP_5(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_5),
XP_DROP_6(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_6),
- XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7);
+ XP_DROP_7(WidgetID.EXPERIENCE_DROP_GROUP_ID, WidgetID.ExperienceDrop.DROP_7),
+
+ ITEMS_KEPT_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.KEPT_ITEMS_TEXT),
+ ITEMS_LOST_ON_DEATH_TEXT(WidgetID.ITEMS_KEPT_ON_DEATH_GROUP_ID, WidgetID.KeptOnDeath.LOST_ITEMS_TEXT);
private final int groupId;
private final int childId;
diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml
index 407a3b17f3..70c5c83000 100644
--- a/runelite-client/pom.xml
+++ b/runelite-client/pom.xml
@@ -29,7 +29,7 @@
net.runeliterunelite-parent
- 1.5.27-SNAPSHOT
+ 1.5.28-SNAPSHOTclient
@@ -209,11 +209,12 @@
net.runelite.rsrunescape-api${project.version}
+ runtime
- net.runelit
- client-patch
- 1.5.26.2
+ net.runelite
+ injected-client
+ ${project.version}runtime
@@ -232,11 +233,6 @@
${runelite.orange.extensions.version}provided
-
- net.runelite.rs
- runescape-api
- ${project.version}
- junitjunit
@@ -339,8 +335,8 @@
-
- net.runelite:api
+
+ net.runelite:***
@@ -351,13 +347,6 @@
**
-
-
- net.runelit:client-patch
-
- **
-
- net.runelite.pushingpixels:*
diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java
index 3978bebfa4..43c833e6b4 100644
--- a/runelite-client/src/main/java/net/runelite/client/Notifier.java
+++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java
@@ -46,11 +46,13 @@ import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
+import net.runelite.api.Constants;
import net.runelite.api.GameState;
import net.runelite.client.chat.ChatColorType;
import net.runelite.client.chat.ChatMessageBuilder;
import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.chat.QueuedMessage;
+import net.runelite.client.config.FlashNotification;
import net.runelite.client.config.RuneLiteConfig;
import net.runelite.client.ui.ClientUI;
import net.runelite.client.util.OSType;
@@ -68,7 +70,8 @@ public class Notifier
// Notifier properties
private static final Color FLASH_COLOR = new Color(255, 0, 0, 70);
- private static final int FLASH_DURATION = 2000;
+ private static final int MINIMUM_FLASH_DURATION_MILLIS = 2000;
+ private static final int MINIMUM_FLASH_DURATION_TICKS = MINIMUM_FLASH_DURATION_MILLIS / Constants.CLIENT_TICK_LENGTH;
private final Client client;
private final String appName;
@@ -79,6 +82,7 @@ public class Notifier
private final Path notifyIconPath;
private final boolean terminalNotifierAvailable;
private Instant flashStart;
+ private long mouseLastPressedMillis;
@Inject
private Notifier(
@@ -146,9 +150,10 @@ public class Notifier
.build());
}
- if (runeLiteConfig.enableFlashNotification())
+ if (runeLiteConfig.flashNotification() != FlashNotification.DISABLED)
{
flashStart = Instant.now();
+ mouseLastPressedMillis = client.getMouseLastPressedMillis();
}
log.debug(message);
@@ -156,24 +161,48 @@ public class Notifier
public void processFlash(final Graphics2D graphics)
{
- if (flashStart == null || client.getGameCycle() % 40 >= 20)
- {
- return;
- }
- else if (client.getGameState() != GameState.LOGGED_IN)
+ if (flashStart == null || client.getGameState() != GameState.LOGGED_IN)
{
flashStart = null;
return;
}
+ FlashNotification flashNotification = runeLiteConfig.flashNotification();
+
+ if (client.getGameCycle() % 40 >= 20
+ // For solid colour, fall through every time.
+ && (flashNotification == FlashNotification.FLASH_TWO_SECONDS
+ || flashNotification == FlashNotification.FLASH_UNTIL_CANCELLED))
+ {
+ return;
+ }
+
final Color color = graphics.getColor();
graphics.setColor(FLASH_COLOR);
graphics.fill(new Rectangle(client.getCanvas().getSize()));
graphics.setColor(color);
- if (Instant.now().minusMillis(FLASH_DURATION).isAfter(flashStart))
+ if (!Instant.now().minusMillis(MINIMUM_FLASH_DURATION_MILLIS).isAfter(flashStart))
{
- flashStart = null;
+ return;
+ }
+
+ switch (flashNotification)
+ {
+ case FLASH_TWO_SECONDS:
+ case SOLID_TWO_SECONDS:
+ flashStart = null;
+ break;
+ case SOLID_UNTIL_CANCELLED:
+ case FLASH_UNTIL_CANCELLED:
+ // Any interaction with the client since the notification started will cancel it after the minimum duration
+ if (client.getMouseIdleTicks() < MINIMUM_FLASH_DURATION_TICKS
+ || client.getKeyboardIdleTicks() < MINIMUM_FLASH_DURATION_TICKS
+ || client.getMouseLastPressedMillis() > mouseLastPressedMillis)
+ {
+ flashStart = null;
+ }
+ break;
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLite.java b/runelite-client/src/main/java/net/runelite/client/RuneLite.java
index c79acfb86a..f4626b10a0 100644
--- a/runelite-client/src/main/java/net/runelite/client/RuneLite.java
+++ b/runelite-client/src/main/java/net/runelite/client/RuneLite.java
@@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory;
@Slf4j
public class RuneLite
{
- public static final String RUNELIT_VERSION = "2.0.0";
+ public static final String RUNELIT_VERSION = "2.0.1-1";
public static final File RUNELITE_DIR = new File(System.getProperty("user.home"), ".runelite");
public static final File PROFILES_DIR = new File(RUNELITE_DIR, "profiles");
public static final File PLUGIN_DIR = new File(RUNELITE_DIR, "plugins");
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/FontStyle.java b/runelite-client/src/main/java/net/runelite/client/config/FlashNotification.java
similarity index 75%
rename from runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/FontStyle.java
rename to runelite-client/src/main/java/net/runelite/client/config/FlashNotification.java
index 9b5c1a1ea7..f90ce26ad2 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/FontStyle.java
+++ b/runelite-client/src/main/java/net/runelite/client/config/FlashNotification.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, ganom
+ * Copyright (c) 2019, Twiglet1022
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,6 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -21,26 +22,26 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package net.runelite.client.plugins.coxhelper;
+package net.runelite.client.config;
-import java.awt.Font;
-import lombok.AllArgsConstructor;
import lombok.Getter;
+import lombok.RequiredArgsConstructor;
@Getter
-@AllArgsConstructor
-public enum FontStyle
+@RequiredArgsConstructor
+public enum FlashNotification
{
- BOLD("Bold", Font.BOLD),
- ITALIC("Italic", Font.ITALIC),
- PLAIN("Plain", Font.PLAIN);
+ DISABLED("Off"),
+ FLASH_TWO_SECONDS("Flash for 2 seconds"),
+ SOLID_TWO_SECONDS("Solid for 2 seconds"),
+ FLASH_UNTIL_CANCELLED("Flash until cancelled"),
+ SOLID_UNTIL_CANCELLED("Solid until cancelled");
- private String name;
- private int font;
+ private final String type;
@Override
public String toString()
{
- return getName();
+ return type;
}
-}
\ No newline at end of file
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
index 4c349b2131..fea5ab1734 100644
--- a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
@@ -191,9 +191,9 @@ public interface RuneLiteConfig extends Config
description = "Flashes the game frame as a notification",
position = 24
)
- default boolean enableFlashNotification()
+ default FlashNotification flashNotification()
{
- return false;
+ return FlashNotification.DISABLED;
}
@ConfigItem(
diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemManager.java b/runelite-client/src/main/java/net/runelite/client/game/ItemManager.java
index 44a47789d7..02f5a8785d 100644
--- a/runelite-client/src/main/java/net/runelite/client/game/ItemManager.java
+++ b/runelite-client/src/main/java/net/runelite/client/game/ItemManager.java
@@ -44,8 +44,9 @@ import javax.inject.Singleton;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
+import net.runelite.api.Constants;
import static net.runelite.api.Constants.CLIENT_DEFAULT_ZOOM;
-import static net.runelite.api.Constants.HIGH_ALCHEMY_CONSTANT;
+import static net.runelite.api.Constants.HIGH_ALCHEMY_MULTIPLIER;
import net.runelite.api.GameState;
import net.runelite.api.ItemDefinition;
import net.runelite.api.ItemID;
@@ -423,7 +424,7 @@ public class ItemManager
return 1000;
}
- return (int) Math.max(1, composition.getPrice() * HIGH_ALCHEMY_CONSTANT);
+ return (int) Math.max(1, composition.getPrice() * HIGH_ALCHEMY_MULTIPLIER);
}
public int getAlchValue(int itemID)
@@ -437,7 +438,7 @@ public class ItemManager
return 1000;
}
- return (int) Math.max(1, getItemDefinition(itemID).getPrice() * HIGH_ALCHEMY_CONSTANT);
+ return (int) Math.max(1, getItemDefinition(itemID).getPrice() * HIGH_ALCHEMY_MULTIPLIER);
}
/**
@@ -521,7 +522,7 @@ public class ItemManager
*/
private AsyncBufferedImage loadImage(int itemId, int quantity, boolean stackable)
{
- AsyncBufferedImage img = new AsyncBufferedImage(36, 32, BufferedImage.TYPE_INT_ARGB);
+ AsyncBufferedImage img = new AsyncBufferedImage(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT, BufferedImage.TYPE_INT_ARGB);
clientThread.invoke(() ->
{
if (client.getGameState().ordinal() < GameState.LOGIN_SCREEN.ordinal())
diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java
index 28420abcb5..1c5d861649 100644
--- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java
+++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java
@@ -144,10 +144,12 @@ public enum ItemMapping
// Bounty hunter
ITEM_GRANITE_MAUL(GRANITE_MAUL, GRANITE_MAUL_12848),
ITEM_MAGIC_SHORTBOW(MAGIC_SHORTBOW, MAGIC_SHORTBOW_I),
+ ITEM_MAGIC_SHORTBOW_SCROLL(MAGIC_SHORTBOW_SCROLL, MAGIC_SHORTBOW_I),
ITEM_SARADOMINS_BLESSED_SWORD(SARADOMINS_TEAR, SARADOMINS_BLESSED_SWORD),
// Jewellery with charges
ITEM_RING_OF_WEALTH(RING_OF_WEALTH, RING_OF_WEALTH_I, RING_OF_WEALTH_1, RING_OF_WEALTH_I1, RING_OF_WEALTH_2, RING_OF_WEALTH_I2, RING_OF_WEALTH_3, RING_OF_WEALTH_I3, RING_OF_WEALTH_4, RING_OF_WEALTH_I4, RING_OF_WEALTH_I5),
+ ITEM_RING_OF_WEALTH_SCROLL(RING_OF_WEALTH_SCROLL, RING_OF_WEALTH_I, RING_OF_WEALTH_I1, RING_OF_WEALTH_I2, RING_OF_WEALTH_I3, RING_OF_WEALTH_I4, RING_OF_WEALTH_I5),
ITEM_AMULET_OF_GLORY(AMULET_OF_GLORY, AMULET_OF_GLORY1, AMULET_OF_GLORY2, AMULET_OF_GLORY3, AMULET_OF_GLORY5),
ITEM_AMULET_OF_GLORY_T(AMULET_OF_GLORY_T, AMULET_OF_GLORY_T1, AMULET_OF_GLORY_T2, AMULET_OF_GLORY_T3, AMULET_OF_GLORY_T5),
ITEM_SKILLS_NECKLACE(SKILLS_NECKLACE, SKILLS_NECKLACE1, SKILLS_NECKLACE2, SKILLS_NECKLACE3, SKILLS_NECKLACE5),
diff --git a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java
index 4dcdb918c3..e297e103c7 100644
--- a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java
+++ b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java
@@ -109,7 +109,7 @@ public class LootManager
case NpcID.LIZARD:
case NpcID.ZYGOMITE:
- case NpcID.ZYGOMITE_474:
+ case NpcID.ZYGOMITE_1024:
case NpcID.ANCIENT_ZYGOMITE:
// these monsters die with >0 hp, so we just look for coincident
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectile.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectile.java
index 956f8f74e6..a00d79e403 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectile.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectile.java
@@ -28,40 +28,17 @@
package net.runelite.client.plugins.aoewarnings;
import java.time.Instant;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import net.runelite.api.coords.LocalPoint;
+@Getter
+@AllArgsConstructor
class AoeProjectile
{
private final Instant startTime;
private final LocalPoint targetPoint;
private final AoeProjectileInfo aoeProjectileInfo;
private final int projectileLifetime;
-
- AoeProjectile(Instant startTime, LocalPoint targetPoint, AoeProjectileInfo aoeProjectileInfo, int projectileLifetime)
- {
- this.startTime = startTime;
- this.targetPoint = targetPoint;
- this.aoeProjectileInfo = aoeProjectileInfo;
- this.projectileLifetime = projectileLifetime;
- }
-
- Instant getStartTime()
- {
- return startTime;
- }
-
- LocalPoint getTargetPoint()
- {
- return targetPoint;
- }
-
- AoeProjectileInfo getAoeProjectileInfo()
- {
- return aoeProjectileInfo;
- }
-
- int getProjectileLifetime()
- {
- return projectileLifetime;
- }
-}
+ private final int finalTick;
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java
index 486316f39c..38d0798ab7 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java
@@ -27,14 +27,36 @@
package net.runelite.client.plugins.aoewarnings;
import java.awt.Color;
+import java.awt.Font;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
+import net.runelite.client.config.Range;
import net.runelite.client.config.Stub;
@ConfigGroup("aoe")
public interface AoeWarningConfig extends Config
{
+ @Getter
+ @AllArgsConstructor
+ public enum FontStyle
+ {
+ BOLD("Bold", Font.BOLD),
+ ITALIC("Italic", Font.ITALIC),
+ PLAIN("Plain", Font.PLAIN);
+
+ private String name;
+ private int font;
+
+ @Override
+ public String toString()
+ {
+ return getName();
+ }
+ }
+
@ConfigItem(
keyName = "aoeNotifyAll",
name = "Notify for all AoE warnings",
@@ -105,11 +127,82 @@ public interface AoeWarningConfig extends Config
return true;
}
+ @ConfigItem(
+ keyName = "tickTimers",
+ name = "Tick Timers",
+ description = "Configures whether or not AoE Projectile Warnings has tick timers overlaid as well.",
+ parent = "overlayStub",
+ position = 6
+ )
+ default boolean tickTimers()
+ {
+ return true;
+ }
+
+ @ConfigItem(
+ position = 7,
+ keyName = "text",
+ name = "Text",
+ description = "",
+ hidden = true,
+ unhide = "tickTimers"
+ )
+ default Stub text()
+ {
+ return new Stub();
+ }
+
+ @ConfigItem(
+ position = 8,
+ keyName = "fontStyle",
+ name = "Font Style",
+ description = "Bold/Italics/Plain",
+ parent = "text",
+ hidden = true,
+ unhide = "tickTimers"
+ )
+ default FontStyle fontStyle()
+ {
+ return FontStyle.BOLD;
+ }
+
+ @Range(
+ min = 20,
+ max = 40
+ )
+ @ConfigItem(
+ position = 9,
+ keyName = "textSize",
+ name = "Text Size",
+ description = "Text Size for Timers.",
+ parent = "text",
+ hidden = true,
+ unhide = "tickTimers"
+ )
+ default int textSize()
+ {
+ return 32;
+ }
+
+ @ConfigItem(
+ position = 10,
+ keyName = "shadows",
+ name = "Shadows",
+ description = "Adds Shadows to text.",
+ parent = "text",
+ hidden = true,
+ unhide = "tickTimers"
+ )
+ default boolean shadows()
+ {
+ return true;
+ }
+
@ConfigItem(
keyName = "npcStub",
name = "NPC's",
description = "",
- position = 6
+ position = 11
)
default Stub npcStub()
{
@@ -120,7 +213,7 @@ public interface AoeWarningConfig extends Config
keyName = "lizardmanaoeStub",
name = "Lizardman Shamans",
description = "",
- position = 7,
+ position = 12,
parent = "npcStub"
)
default Stub lizardmanaoeStub()
@@ -133,7 +226,7 @@ public interface AoeWarningConfig extends Config
name = "Lizardman Shamans",
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans is displayed",
parent = "lizardmanaoeStub",
- position = 8
+ position = 13
)
default boolean isShamansEnabled()
{
@@ -145,7 +238,7 @@ public interface AoeWarningConfig extends Config
name = "Lizardman Shamans Notify",
description = "Configures whether or not AoE Projectile Warnings for Lizardman Shamans should trigger a notification",
parent = "lizardmanaoeStub",
- position = 9,
+ position = 14,
hide = "aoeNotifyAll"
)
default boolean isShamansNotifyEnabled()
@@ -157,7 +250,7 @@ public interface AoeWarningConfig extends Config
keyName = "archaeologistaoeStub",
name = "Crazy Archaeologist",
description = "",
- position = 10,
+ position = 15,
parent = "npcStub"
)
default Stub archaeologistaoeStub()
@@ -170,7 +263,7 @@ public interface AoeWarningConfig extends Config
name = "Crazy Archaeologist",
description = "Configures whether or not AoE Projectile Warnings for Archaeologist is displayed",
parent = "archaeologistaoeStub",
- position = 11
+ position = 16
)
default boolean isArchaeologistEnabled()
{
@@ -182,7 +275,7 @@ public interface AoeWarningConfig extends Config
name = "Crazy Archaeologist Notify",
description = "Configures whether or not AoE Projectile Warnings for Crazy Archaeologist should trigger a notification",
parent = "archaeologistaoeStub",
- position = 12,
+ position = 17,
hide = "aoeNotifyAll"
)
default boolean isArchaeologistNotifyEnabled()
@@ -194,7 +287,7 @@ public interface AoeWarningConfig extends Config
keyName = "icedemonStub",
name = "Ice Demon",
description = "",
- position = 13,
+ position = 18,
parent = "npcStub"
)
default Stub icedemonStub()
@@ -207,7 +300,7 @@ public interface AoeWarningConfig extends Config
name = "Ice Demon",
description = "Configures whether or not AoE Projectile Warnings for Ice Demon is displayed",
parent = "icedemonStub",
- position = 14
+ position = 19
)
default boolean isIceDemonEnabled()
{
@@ -219,7 +312,7 @@ public interface AoeWarningConfig extends Config
name = "Ice Demon Notify",
description = "Configures whether or not AoE Projectile Warnings for Ice Demon should trigger a notification",
parent = "icedemonStub",
- position = 15,
+ position = 20,
hide = "aoeNotifyAll"
)
default boolean isIceDemonNotifyEnabled()
@@ -231,7 +324,7 @@ public interface AoeWarningConfig extends Config
keyName = "vasaStub",
name = "Vasa",
description = "",
- position = 16,
+ position = 21,
parent = "npcStub"
)
default Stub vasaStub()
@@ -244,7 +337,7 @@ public interface AoeWarningConfig extends Config
name = "Vasa",
description = "Configures whether or not AoE Projectile Warnings for Vasa is displayed",
parent = "vasaStub",
- position = 17
+ position = 22
)
default boolean isVasaEnabled()
{
@@ -256,7 +349,7 @@ public interface AoeWarningConfig extends Config
name = "Vasa Notify",
description = "Configures whether or not AoE Projectile Warnings for Vasa should trigger a notification",
parent = "vasaStub",
- position = 18,
+ position = 23,
hide = "aoeNotifyAll"
)
default boolean isVasaNotifyEnabled()
@@ -268,7 +361,7 @@ public interface AoeWarningConfig extends Config
keyName = "tektonStub",
name = "Tekton",
description = "",
- position = 19,
+ position = 24,
parent = "npcStub"
)
default Stub tektonStub()
@@ -281,7 +374,7 @@ public interface AoeWarningConfig extends Config
name = "Tekton",
description = "Configures whether or not AoE Projectile Warnings for Tekton is displayed",
parent = "tektonStub",
- position = 20
+ position = 25
)
default boolean isTektonEnabled()
{
@@ -293,7 +386,7 @@ public interface AoeWarningConfig extends Config
name = "Tekton Notify",
description = "Configures whether or not AoE Projectile Warnings for Tekton should trigger a notification",
parent = "tektonStub",
- position = 21,
+ position = 26,
hide = "aoeNotifyAll"
)
default boolean isTektonNotifyEnabled()
@@ -305,7 +398,7 @@ public interface AoeWarningConfig extends Config
keyName = "vorkathStub",
name = "Vorkath",
description = "",
- position = 22,
+ position = 27,
parent = "npcStub"
)
default Stub vorkathStub()
@@ -318,7 +411,7 @@ public interface AoeWarningConfig extends Config
name = "Vorkath",
description = "Configures whether or not AoE Projectile Warnings for Vorkath are displayed",
parent = "vorkathStub",
- position = 23
+ position = 28
)
default boolean isVorkathEnabled()
{
@@ -330,7 +423,7 @@ public interface AoeWarningConfig extends Config
name = "Vorkath Notify",
description = "Configures whether or not AoE Projectile Warnings for Vorkath should trigger a notification",
parent = "vorkathStub",
- position = 24,
+ position = 29,
hide = "aoeNotifyAll"
)
default boolean isVorkathNotifyEnabled()
@@ -342,7 +435,7 @@ public interface AoeWarningConfig extends Config
keyName = "galvekStub",
name = "Galvek",
description = "",
- position = 25,
+ position = 30,
parent = "npcStub"
)
default Stub galvekStub()
@@ -355,7 +448,7 @@ public interface AoeWarningConfig extends Config
name = "Galvek",
description = "Configures whether or not AoE Projectile Warnings for Galvek are displayed",
parent = "galvekStub",
- position = 26
+ position = 31
)
default boolean isGalvekEnabled()
{
@@ -367,7 +460,7 @@ public interface AoeWarningConfig extends Config
name = "Galvek Notify",
description = "Configures whether or not AoE Projectile Warnings for Galvek should trigger a notification",
parent = "galvekStub",
- position = 27,
+ position = 32,
hide = "aoeNotifyAll"
)
default boolean isGalvekNotifyEnabled()
@@ -379,7 +472,7 @@ public interface AoeWarningConfig extends Config
keyName = "gargbossStub",
name = "Gargoyle Boss",
description = "",
- position = 28,
+ position = 33,
parent = "npcStub"
)
default Stub gargbossStub()
@@ -392,7 +485,7 @@ public interface AoeWarningConfig extends Config
name = "Gargoyle Boss",
description = "Configs whether or not AoE Projectile Warnings for Dawn/Dusk are displayed",
parent = "gargbossStub",
- position = 29
+ position = 34
)
default boolean isGargBossEnabled()
{
@@ -404,7 +497,7 @@ public interface AoeWarningConfig extends Config
name = "Gargoyle Boss Notify",
description = "Configures whether or not AoE Projectile Warnings for Gargoyle Bosses should trigger a notification",
parent = "gargbossStub",
- position = 30,
+ position = 35,
hide = "aoeNotifyAll"
)
default boolean isGargBossNotifyEnabled()
@@ -416,7 +509,7 @@ public interface AoeWarningConfig extends Config
keyName = "vetionStub",
name = "Vet'ion",
description = "",
- position = 31,
+ position = 36,
parent = "npcStub"
)
default Stub vetionStub()
@@ -429,7 +522,7 @@ public interface AoeWarningConfig extends Config
name = "Vet'ion",
description = "Configures whether or not AoE Projectile Warnings for Vet'ion are displayed",
parent = "vetionStub",
- position = 32
+ position = 37
)
default boolean isVetionEnabled()
{
@@ -441,7 +534,7 @@ public interface AoeWarningConfig extends Config
name = "Vet'ion Notify",
description = "Configures whether or not AoE Projectile Warnings for Vet'ion should trigger a notification",
parent = "vetionStub",
- position = 33,
+ position = 38,
hide = "aoeNotifyAll"
)
default boolean isVetionNotifyEnabled()
@@ -453,7 +546,7 @@ public interface AoeWarningConfig extends Config
keyName = "chaosfanaticStub",
name = "Chaos Fanatic",
description = "",
- position = 34,
+ position = 39,
parent = "npcStub"
)
default Stub chaosfanaticStub()
@@ -466,7 +559,7 @@ public interface AoeWarningConfig extends Config
name = "Chaos Fanatic",
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic are displayed",
parent = "chaosfanaticStub",
- position = 35
+ position = 40
)
default boolean isChaosFanaticEnabled()
{
@@ -478,7 +571,7 @@ public interface AoeWarningConfig extends Config
name = "Chaos Fanatic Notify",
description = "Configures whether or not AoE Projectile Warnings for Chaos Fanatic should trigger a notification",
parent = "chaosfanaticStub",
- position = 36,
+ position = 41,
hide = "aoeNotifyAll"
)
default boolean isChaosFanaticNotifyEnabled()
@@ -490,7 +583,7 @@ public interface AoeWarningConfig extends Config
keyName = "olmStub",
name = "Olm",
description = "",
- position = 37,
+ position = 42,
parent = "npcStub"
)
default Stub olmStub()
@@ -503,7 +596,7 @@ public interface AoeWarningConfig extends Config
name = "Olm",
description = "Configures whether or not AoE Projectile Warnings for The Great Olm are displayed",
parent = "olmStub",
- position = 38
+ position = 43
)
default boolean isOlmEnabled()
{
@@ -515,7 +608,7 @@ public interface AoeWarningConfig extends Config
name = "Olm Notify",
description = "Configures whether or not AoE Projectile Warnings for Olm should trigger a notification",
parent = "olmStub",
- position = 39,
+ position = 44,
hide = "aoeNotifyAll"
)
default boolean isOlmNotifyEnabled()
@@ -527,7 +620,7 @@ public interface AoeWarningConfig extends Config
keyName = "olmBombStub",
name = "Bombs",
description = "",
- position = 40,
+ position = 45,
parent = "olmStub"
)
default Stub olmBombsStub()
@@ -540,7 +633,7 @@ public interface AoeWarningConfig extends Config
name = "Olm Bombs",
description = "Display a timer and colour-coded AoE for Olm's crystal-phase bombs.",
parent = "olmBombStub",
- position = 41
+ position = 46
)
default boolean bombDisplay()
{
@@ -552,7 +645,7 @@ public interface AoeWarningConfig extends Config
name = "Olm Bombs Notify",
description = "Configures whether or not AoE Projectile Warnings for Olm Bombs should trigger a notification",
parent = "olmBombStub",
- position = 42,
+ position = 47,
hide = "aoeNotifyAll"
)
default boolean bombDisplayNotifyEnabled()
@@ -564,7 +657,7 @@ public interface AoeWarningConfig extends Config
keyName = "olmlightningStub",
name = "Lightning Trails",
description = "",
- position = 43,
+ position = 48,
parent = "olmStub"
)
default Stub olmlightningStub()
@@ -577,7 +670,7 @@ public interface AoeWarningConfig extends Config
name = "Olm Lightning Trails",
description = "Show Lightning Trails",
parent = "olmlightningStub",
- position = 44
+ position = 49
)
default boolean LightningTrail()
{
@@ -589,7 +682,7 @@ public interface AoeWarningConfig extends Config
name = "Olm Lightning Trails Notify",
description = "Configures whether or not AoE Projectile Warnings for Olm Lightning Trails should trigger a notification",
parent = "olmlightningStub",
- position = 45,
+ position = 50,
hide = "aoeNotifyAll"
)
default boolean LightningTrailNotifyEnabled()
@@ -601,7 +694,7 @@ public interface AoeWarningConfig extends Config
keyName = "corpStub",
name = "Corporeal Beast",
description = "",
- position = 46,
+ position = 51,
parent = "npcStub"
)
default Stub corpStub()
@@ -614,7 +707,7 @@ public interface AoeWarningConfig extends Config
name = "Corporeal Beast",
description = "Configures whether or not AoE Projectile Warnings for the Corporeal Beast are displayed",
parent = "corpStub",
- position = 47
+ position = 52
)
default boolean isCorpEnabled()
{
@@ -626,7 +719,7 @@ public interface AoeWarningConfig extends Config
name = "Corporeal Beast Notify",
description = "Configures whether or not AoE Projectile Warnings for Corporeal Beast should trigger a notification",
parent = "corpStub",
- position = 48,
+ position = 53,
hide = "aoeNotifyAll"
)
default boolean isCorpNotifyEnabled()
@@ -638,7 +731,7 @@ public interface AoeWarningConfig extends Config
keyName = "wintertodtStub",
name = "Wintertodt",
description = "",
- position = 49,
+ position = 54,
parent = "npcStub"
)
default Stub wintertodtStub()
@@ -651,7 +744,7 @@ public interface AoeWarningConfig extends Config
name = "Wintertodt Snow Fall",
description = "Configures whether or not AOE Projectile Warnings for the Wintertodt snow fall are displayed",
parent = "wintertodtStub",
- position = 50
+ position = 55
)
default boolean isWintertodtEnabled()
{
@@ -663,7 +756,7 @@ public interface AoeWarningConfig extends Config
name = "Wintertodt Snow Fall Notify",
description = "Configures whether or not AoE Projectile Warnings for Wintertodt Snow Fall Notify should trigger a notification",
parent = "wintertodtStub",
- position = 51,
+ position = 56,
hide = "aoeNotifyAll"
)
default boolean isWintertodtNotifyEnabled()
@@ -675,7 +768,7 @@ public interface AoeWarningConfig extends Config
keyName = "xarpusStub",
name = "Xarpus",
description = "",
- position = 52,
+ position = 57,
parent = "npcStub"
)
default Stub xarpusStub()
@@ -688,7 +781,7 @@ public interface AoeWarningConfig extends Config
name = "Xarpus",
description = "Configures whether or not AOE Projectile Warnings for Xarpus are displayed",
parent = "xarpusStub",
- position = 53
+ position = 58
)
default boolean isXarpusEnabled()
{
@@ -700,7 +793,7 @@ public interface AoeWarningConfig extends Config
name = "Xarpus Notify",
description = "Configures whether or not AoE Projectile Warnings for Xarpus should trigger a notification",
parent = "xarpusStub",
- position = 54,
+ position = 59,
hide = "aoeNotifyAll"
)
default boolean isXarpusNotifyEnabled()
@@ -712,7 +805,7 @@ public interface AoeWarningConfig extends Config
keyName = "addyDragsStub",
name = "Addy Drags",
description = "",
- position = 55,
+ position = 60,
parent = "npcStub"
)
default Stub addyDragsStub()
@@ -725,7 +818,7 @@ public interface AoeWarningConfig extends Config
name = "Addy Drags",
description = "Show Bad Areas",
parent = "addyDragsStub",
- position = 56
+ position = 61
)
default boolean addyDrags()
{
@@ -737,7 +830,7 @@ public interface AoeWarningConfig extends Config
name = "Addy Drags Notify",
description = "Configures whether or not AoE Projectile Warnings for Addy Dragons should trigger a notification",
parent = "addyDragsStub",
- position = 57,
+ position = 62,
hide = "aoeNotifyAll"
)
default boolean addyDragsNotifyEnabled()
@@ -749,7 +842,7 @@ public interface AoeWarningConfig extends Config
keyName = "drakeStub",
name = "Drakes",
description = "",
- position = 58,
+ position = 63,
parent = "npcStub"
)
default Stub drakeStub()
@@ -762,7 +855,7 @@ public interface AoeWarningConfig extends Config
name = "Drakes Breath",
description = "Configures if Drakes Breath tile markers are displayed",
parent = "drakeStub",
- position = 59
+ position = 64
)
default boolean isDrakeEnabled()
{
@@ -774,7 +867,7 @@ public interface AoeWarningConfig extends Config
name = "Drakes Breath Notify",
description = "Configures whether or not AoE Projectile Warnings for Drakes Breath should trigger a notification",
parent = "drakeStub",
- position = 60,
+ position = 65,
hide = "aoeNotifyAll"
)
default boolean isDrakeNotifyEnabled()
@@ -786,7 +879,7 @@ public interface AoeWarningConfig extends Config
keyName = "cerberusStub",
name = "Cerberus",
description = "",
- position = 61,
+ position = 66,
parent = "npcStub"
)
default Stub cerberusStub()
@@ -799,7 +892,7 @@ public interface AoeWarningConfig extends Config
name = "Cerberus Fire",
description = "Configures if Cerberus fire tile markers are displayed",
parent = "cerberusStub",
- position = 62
+ position = 67
)
default boolean isCerbFireEnabled()
{
@@ -811,7 +904,7 @@ public interface AoeWarningConfig extends Config
name = "Cerberus Fire Notify",
description = "Configures whether or not AoE Projectile Warnings for Cerberus his fire should trigger a notification",
parent = "cerberusStub",
- position = 63,
+ position = 68,
hide = "aoeNotifyAll"
)
default boolean isCerbFireNotifyEnabled()
@@ -823,7 +916,7 @@ public interface AoeWarningConfig extends Config
keyName = "demonicGorillaStub",
name = "Demonic Gorilla",
description = "",
- position = 64,
+ position = 69,
parent = "npcStub"
)
default Stub demonicGorillaStub()
@@ -836,7 +929,7 @@ public interface AoeWarningConfig extends Config
name = "Demonic Gorilla",
description = "Configures if Demonic Gorilla boulder tile markers are displayed",
parent = "demonicGorillaStub",
- position = 65
+ position = 70
)
default boolean isDemonicGorillaEnabled()
{
@@ -848,7 +941,7 @@ public interface AoeWarningConfig extends Config
name = "Demonic Gorilla Notify",
description = "Configures whether or not AoE Projectile Warnings for Demonic Gorilla boulders should trigger a notification",
parent = "demonicGorillaStub",
- position = 66,
+ position = 71,
hide = "aoeNotifyAll"
)
default boolean isDemonicGorillaNotifyEnabled()
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java
index c6799ac343..179c9b8c02 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningOverlay.java
@@ -30,8 +30,10 @@ package net.runelite.client.plugins.aoewarnings;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
+import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Polygon;
+import java.awt.Rectangle;
import java.time.Duration;
import java.time.Instant;
import java.util.Iterator;
@@ -40,12 +42,14 @@ import javax.annotation.Nullable;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.Perspective;
+import net.runelite.api.Point;
import net.runelite.api.Projectile;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
+import net.runelite.client.ui.overlay.OverlayUtil;
import static net.runelite.client.util.ColorUtil.setAlphaComponent;
public class AoeWarningOverlay extends Overlay
@@ -95,7 +99,7 @@ public class AoeWarningOverlay extends Overlay
for (Iterator it = projectiles.values().iterator(); it.hasNext(); )
{
AoeProjectile aoeProjectile = it.next();
-
+ Color color;
if (now.isAfter(aoeProjectile.getStartTime().plus(Duration.ofMillis(aoeProjectile.getProjectileLifetime()))))
{
it.remove();
@@ -111,6 +115,8 @@ public class AoeWarningOverlay extends Overlay
// how far through the projectiles lifetime between 0-1.
double progress = (System.currentTimeMillis() - aoeProjectile.getStartTime().toEpochMilli()) / (double) aoeProjectile.getProjectileLifetime();
+ int tickProgress = aoeProjectile.getFinalTick() - client.getTickCount();
+
int fillAlpha, outlineAlpha;
if (config.isFadeEnabled())
{
@@ -122,6 +128,14 @@ public class AoeWarningOverlay extends Overlay
fillAlpha = FILL_START_ALPHA;
outlineAlpha = OUTLINE_START_ALPHA;
}
+ if (tickProgress == 0)
+ {
+ color = Color.RED;
+ }
+ else
+ {
+ color = Color.WHITE;
+ }
if (fillAlpha < 0)
{
@@ -138,7 +152,7 @@ public class AoeWarningOverlay extends Overlay
}
if (outlineAlpha > 255)
{
- outlineAlpha = 255;//Make sure we don't pass in an invalid alpha
+ outlineAlpha = 255;
}
if (config.isOutlineEnabled())
@@ -146,7 +160,13 @@ public class AoeWarningOverlay extends Overlay
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), outlineAlpha), true));
graphics.drawPolygon(tilePoly);
}
-
+ if (config.tickTimers())
+ {
+ if (tickProgress >= 0)
+ {
+ renderTextLocation(graphics, Integer.toString(tickProgress), config.textSize(), config.fontStyle().getFont(), color, centerPoint(tilePoly.getBounds()));
+ }
+ }
graphics.setColor(new Color(setAlphaComponent(config.overlayColor().getRGB(), fillAlpha), true));
graphics.fillPolygon(tilePoly);
}
@@ -171,11 +191,36 @@ public class AoeWarningOverlay extends Overlay
{
return;
}
- //OverlayUtil.renderPolygon(graphics, poly, color);
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
graphics.setStroke(new BasicStroke(strokeWidth));
graphics.draw(poly);
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
graphics.fill(poly);
}
-}
+
+ private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
+ {
+ graphics.setFont(new Font("Arial", fontStyle, fontSize));
+ if (canvasPoint != null)
+ {
+ final Point canvasCenterPoint = new Point(
+ canvasPoint.getX(),
+ canvasPoint.getY());
+ final Point canvasCenterPoint_shadow = new Point(
+ canvasPoint.getX() + 1,
+ canvasPoint.getY() + 1);
+ if (config.shadows())
+ {
+ OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
+ }
+ OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
+ }
+ }
+
+ private Point centerPoint(Rectangle rect)
+ {
+ int x = (int) (rect.getX() + rect.getWidth() / 2);
+ int y = (int) (rect.getY() + rect.getHeight() / 2);
+ return new Point(x, y);
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java
index b21c43a0fc..37375941d6 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java
@@ -147,11 +147,18 @@ public class AoeWarningPlugin extends Plugin
int projectileId = projectile.getId();
int projectileLifetime = config.delay() + (projectile.getRemainingCycles() * 20);
+ int ticksRemaining = projectile.getRemainingCycles() / 30;
+ if (!isTickTimersEnabledForProjectileID(projectileId))
+ {
+ ticksRemaining = 0;
+ }
+ int tickCycle = client.getTickCount() + ticksRemaining;
AoeProjectileInfo aoeProjectileInfo = AoeProjectileInfo.getById(projectileId);
- if (aoeProjectileInfo != null && isConfigEnabledForProjectileId(projectileId, false))
+ if (aoeProjectileInfo != null
+ && isConfigEnabledForProjectileId(projectileId, false))
{
LocalPoint targetPoint = event.getPosition();
- AoeProjectile aoeProjectile = new AoeProjectile(Instant.now(), targetPoint, aoeProjectileInfo, projectileLifetime);
+ AoeProjectile aoeProjectile = new AoeProjectile(Instant.now(), targetPoint, aoeProjectileInfo, projectileLifetime, tickCycle);
projectiles.put(projectile, aoeProjectile);
if (config.aoeNotifyAll() || isConfigEnabledForProjectileId(projectileId, true))
@@ -294,6 +301,31 @@ public class AoeWarningPlugin extends Plugin
}
}
+ private boolean isTickTimersEnabledForProjectileID(int projectileId)
+ {
+ AoeProjectileInfo projectileInfo = AoeProjectileInfo.getById(projectileId);
+
+ if (projectileInfo == null)
+ {
+ return false;
+ }
+
+ switch (projectileInfo)
+ {
+ case VASA_RANGED_AOE:
+ case VORKATH_POISON_POOL:
+ case VORKATH_SPAWN:
+ case VORKATH_TICK_FIRE:
+ case OLM_BURNING:
+ case OLM_FALLING_CRYSTAL_TRAIL:
+ case OLM_ACID_TRAIL:
+ case OLM_FIRE_LINE:
+ return false;
+ }
+
+ return true;
+ }
+
private boolean isConfigEnabledForProjectileId(int projectileId, boolean notify)
{
AoeProjectileInfo projectileInfo = AoeProjectileInfo.getById(projectileId);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java
index eeaa5a3c3f..a20a858058 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java
@@ -50,6 +50,7 @@ import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.Getter;
import net.runelite.api.Client;
+import net.runelite.api.Constants;
import net.runelite.api.InventoryID;
import net.runelite.api.Item;
import net.runelite.api.ItemDefinition;
@@ -730,7 +731,13 @@ public class TabInterface
if (tagTab.getIcon() == null)
{
- Widget icon = createGraphic(ColorUtil.wrapWithColorTag(tagTab.getTag(), HILIGHT_COLOR), -1, tagTab.getIconItemId(), 36, 32, bounds.x + 3, 1, false);
+ Widget icon = createGraphic(
+ ColorUtil.wrapWithColorTag(tagTab.getTag(), HILIGHT_COLOR),
+ -1,
+ tagTab.getIconItemId(),
+ Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT,
+ bounds.x + 3, 1,
+ false);
int clickmask = icon.getClickMask();
clickmask |= WidgetConfig.DRAG;
clickmask |= WidgetConfig.DRAG_ON;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java
index 8363960a15..92371331cc 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java
@@ -27,12 +27,10 @@
package net.runelite.client.plugins.banlist;
import com.google.inject.Provides;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import javax.inject.Inject;
-
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
import net.runelite.api.ClanMember;
@@ -62,12 +60,12 @@ import okhttp3.Request;
import okhttp3.Response;
@PluginDescriptor(
- name = "Ban List",
- description = "Displays warning in chat when you join a" +
- "clan chat/new member join your clan chat and he is in a WDR/RuneWatch/Manual List",
- tags = {"PVM", "WDR", "RuneWatch"},
- type = PluginType.UTILITY,
- enabledByDefault = false
+ name = "Ban List",
+ description = "Displays warning in chat when you join a" +
+ "clan chat/new member join your clan chat and he is in a WDR/RuneWatch/Manual List",
+ tags = {"PVM", "WDR", "RuneWatch"},
+ type = PluginType.UTILITY,
+ enabledByDefault = false
)
@Slf4j
@@ -137,10 +135,10 @@ public class BanListPlugin extends Plugin
public void onWidgetHiddenChanged(WidgetHiddenChanged widgetHiddenChanged)
{
if (client.getGameState() != GameState.LOGGED_IN
- || client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN) != null
- || client.getViewportWidget() == null
- || client.getWidget(WidgetInfo.CLAN_CHAT) == null
- || !config.highlightInClan())
+ || client.getWidget(WidgetInfo.LOGIN_CLICK_TO_PLAY_SCREEN) != null
+ || client.getViewportWidget() == null
+ || client.getWidget(WidgetInfo.CLAN_CHAT) == null
+ || !config.highlightInClan())
{
return;
}
@@ -159,10 +157,21 @@ public class BanListPlugin extends Plugin
public void onClanMemberJoined(ClanMemberJoined event)
{
ClanMember member = event.getMember();
- ListType listType = checkBanList(Text.standardize(member.getUsername()));
- if (listType != null)
+ ListType scamList = checkScamList(Text.standardize(member.getUsername()));
+ ListType toxicList = checkToxicList(Text.standardize(member.getUsername()));
+
+ if (scamList != null)
{
- sendWarning(Text.standardize(member.getUsername()), listType);
+ sendWarning(Text.standardize(member.getUsername()), scamList);
+ if (config.highlightInClan())
+ {
+ highlightRedInCC();
+ }
+ }
+
+ if (toxicList != null)
+ {
+ sendWarning(Text.standardize(member.getUsername()), toxicList);
if (config.highlightInClan())
{
highlightRedInCC();
@@ -184,10 +193,14 @@ public class BanListPlugin extends Plugin
{
Widget tradingWith = client.getWidget(335, 31);
String name = tradingWith.getText().replaceAll("Trading With: ", "");
- if (checkBanList(name) != null)
+ if (checkScamList(name) != null)
{
tradingWith.setText(tradingWith.getText().replaceAll(name, "
" + name + " (Scammer)" + ""));
}
+ if (checkToxicList(name) != null)
+ {
+ tradingWith.setText(tradingWith.getText().replaceAll(name, "
" + name + " (Toxic)" + ""));
+ }
});
}
}
@@ -196,7 +209,7 @@ public class BanListPlugin extends Plugin
/**
* Compares player name to everything in the ban lists
*/
- private ListType checkBanList(String nameToBeChecked)
+ private ListType checkScamList(String nameToBeChecked)
{
if (wdrScamArrayList.size() > 0 && config.enableWDR())
{
@@ -206,14 +219,6 @@ public class BanListPlugin extends Plugin
}
}
- if (wdrToxicArrayList.size() > 0 && config.enableWDR())
- {
- if (wdrToxicArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
- {
- return ListType.WEDORAIDSTOXIC_LIST;
- }
- }
-
if (runeWatchArrayList.size() > 0 && config.enableRuneWatch())
{
if (runeWatchArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
@@ -233,6 +238,20 @@ public class BanListPlugin extends Plugin
return null;
}
+ private ListType checkToxicList(String nameToBeChecked)
+ {
+
+ if (wdrToxicArrayList.size() > 0 && config.enableWDR())
+ {
+ if (wdrToxicArrayList.stream().anyMatch(nameToBeChecked::equalsIgnoreCase))
+ {
+ return ListType.WEDORAIDSTOXIC_LIST;
+ }
+ }
+
+ return null;
+ }
+
/**
* Sends a warning to our player, notifying them that a player is on a ban list
*/
@@ -242,53 +261,53 @@ public class BanListPlugin extends Plugin
{
case WEDORAIDSSCAM_LIST:
final String wdr__scam_message = new ChatMessageBuilder()
- .append(ChatColorType.HIGHLIGHT)
- .append("Warning! " + playerName + " is on WeDoRaids\' scammer list!")
- .build();
+ .append(ChatColorType.HIGHLIGHT)
+ .append("Warning! " + playerName + " is on WeDoRaids\' scammer list!")
+ .build();
chatMessageManager.queue(
- QueuedMessage.builder()
- .type(ChatMessageType.CONSOLE)
- .runeLiteFormattedMessage(wdr__scam_message)
- .build());
+ QueuedMessage.builder()
+ .type(ChatMessageType.CONSOLE)
+ .runeLiteFormattedMessage(wdr__scam_message)
+ .build());
break;
case WEDORAIDSTOXIC_LIST:
final String wdr__toxic_message = new ChatMessageBuilder()
- .append(ChatColorType.HIGHLIGHT)
- .append("Warning! " + playerName + " is on WeDoRaids\' toxic list!")
- .build();
+ .append(ChatColorType.HIGHLIGHT)
+ .append("Warning! " + playerName + " is on WeDoRaids\' toxic list!")
+ .build();
chatMessageManager.queue(
- QueuedMessage.builder()
- .type(ChatMessageType.CONSOLE)
- .runeLiteFormattedMessage(wdr__toxic_message)
- .build());
+ QueuedMessage.builder()
+ .type(ChatMessageType.CONSOLE)
+ .runeLiteFormattedMessage(wdr__toxic_message)
+ .build());
break;
case RUNEWATCH_LIST:
final String rw_message = new ChatMessageBuilder()
- .append(ChatColorType.HIGHLIGHT)
- .append("Warning! " + playerName + " is on the Runewatch\'s scammer list!")
- .build();
+ .append(ChatColorType.HIGHLIGHT)
+ .append("Warning! " + playerName + " is on the Runewatch\'s scammer list!")
+ .build();
chatMessageManager.queue(
- QueuedMessage.builder()
- .type(ChatMessageType.CONSOLE)
- .runeLiteFormattedMessage(rw_message)
- .build());
+ QueuedMessage.builder()
+ .type(ChatMessageType.CONSOLE)
+ .runeLiteFormattedMessage(rw_message)
+ .build());
break;
case MANUAL_LIST:
final String manual_message = new ChatMessageBuilder()
- .append(ChatColorType.HIGHLIGHT)
- .append("Warning! " + playerName + " is on your manual scammer list!")
- .build();
+ .append(ChatColorType.HIGHLIGHT)
+ .append("Warning! " + playerName + " is on your manual scammer list!")
+ .build();
chatMessageManager.queue(
- QueuedMessage.builder()
- .type(ChatMessageType.CONSOLE)
- .runeLiteFormattedMessage(manual_message)
- .build());
+ QueuedMessage.builder()
+ .type(ChatMessageType.CONSOLE)
+ .runeLiteFormattedMessage(manual_message)
+ .build());
break;
}
}
@@ -299,8 +318,8 @@ public class BanListPlugin extends Plugin
private void fetchFromWebsites()
{
Request request = new Request.Builder()
- .url("https://wdrdev.github.io/index")
- .build();
+ .url("https://wdrdev.github.io/index")
+ .build();
RuneLiteAPI.CLIENT.newCall(request).enqueue(new Callback()
{
@Override
@@ -327,8 +346,8 @@ public class BanListPlugin extends Plugin
Request secondRequest = new Request.Builder()
- .url("https://runewatch.com/incident-index-page/")
- .build();
+ .url("https://runewatch.com/incident-index-page/")
+ .build();
RuneLiteAPI.CLIENT.newCall(secondRequest).enqueue(new Callback()
{
@Override
@@ -356,8 +375,8 @@ public class BanListPlugin extends Plugin
});
Request thirdRequest = new Request.Builder()
- .url("https://wdrdev.github.io/toxic")
- .build();
+ .url("https://wdrdev.github.io/toxic")
+ .build();
RuneLiteAPI.CLIENT.newCall(thirdRequest).enqueue(new Callback()
{
@Override
@@ -393,13 +412,18 @@ public class BanListPlugin extends Plugin
Widget widget = client.getWidget(WidgetInfo.CLAN_CHAT_LIST);
for (Widget widgetChild : widget.getDynamicChildren())
{
- ListType listType = checkBanList(widgetChild.getText());
+ ListType scamList = checkScamList(widgetChild.getText());
+ ListType toxicList = checkToxicList(widgetChild.getText());
- if (listType != null)
+ if (scamList != null)
{
widgetChild.setText("
items", getDefaultItemsKept()));
+ }
+
+
+ if (wildyLevel < 1)
+ {
+ sb.append(LINE_BREAK)
+ .append(LINE_BREAK)
+ .append("You will have 1 hour to retrieve your lost items.");
+ }
+
+ if (hasAlwaysLost)
+ {
+ sb.append(LINE_BREAK)
+ .append(LINE_BREAK)
+ .append("Items with a
white outline
will always be lost.");
+ }
+
+ sb.append(LINE_BREAK)
+ .append(LINE_BREAK)
+ .append("Untradeable items are kept on death in non-pvp scenarios.");
+
+ return sb.toString();
+ }
+
+ /**
+ * Updates the information panel based on the item containers
+ */
+ private void updateKeptWidgetInfoText(final boolean hasAlwaysLost, final List keptItems, final List lostItems)
+ {
+ // Add Information text widget
+ final Widget textWidget = findOrCreateInfoText();
+ textWidget.setText(getInfoText(hasAlwaysLost));
+ textWidget.revalidate();
+
+ // Update Items lost total value
+ long total = 0;
+ for (final Widget w : lostItems)
+ {
+ int cid = itemManager.canonicalize(w.getItemId());
+ int price = itemManager.getItemPrice(cid);
+ if (price == 0)
+ {
+ // Default to alch price
+ price = (int) (itemManager.getItemDefinition(cid).getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
+ }
+ total += (long) price * w.getItemQuantity();
+ }
+ final Widget lostValue = client.getWidget(WidgetInfo.ITEMS_LOST_VALUE);
+ lostValue.setText(StackFormatter.quantityToStackSize(total) + " gp");
+
+ // Update Max items kept
+ final Widget max = client.getWidget(WidgetInfo.ITEMS_KEPT_MAX);
+ final int keptQty = keptItems.stream().mapToInt(Widget::getItemQuantity).sum();
+ max.setText(String.format("
Max items kept on death:
~ %d ~", keptQty));
+ }
+
+ /**
+ * Check if an item is tradeable to another player
+ *
+ * @param c The item
+ * @return
+ */
+ private static boolean isTradeable(final ItemDefinition c)
+ {
+ // ItemDefinition:: isTradeable checks if they are traded on the grand exchange, some items are trade-able but not via GE
+ if (c.getNote() != -1
+ || c.getLinkedNoteId() != -1
+ || c.isTradeable())
+ {
+ return true;
+ }
+
+ final int id = c.getId();
+ switch (id)
+ {
+ case ItemID.COINS_995:
+ case ItemID.PLATINUM_TOKEN:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ private Widget findOrCreateInfoText()
+ {
+ // The text was on the ITEMS_KEPT_INFORMATION_CONTAINER widget - but now that it is a layer,
+ // we need to create a child widget to hold the text
+ final Widget parent = client.getWidget(WidgetInfo.ITEMS_KEPT_INFORMATION_CONTAINER);
+
+ // Use the text TEXT widget if it already exists. It should be the last child of the parent
+ final Widget[] children = parent.getChildren();
+ if (children != null && children.length > 0)
+ {
+ final Widget w = parent.getChild(children.length - 1);
+ if (w != null && w.getType() == WidgetType.TEXT)
+ {
+ log.debug("Reusing old text widget");
+ return w;
+ }
+ }
+
+ log.debug("Creating new text widget");
+
+ final Widget w = parent.createChild(-1, WidgetType.TEXT);
+ // Position under buttons taking remaining space
+ w.setOriginalWidth(parent.getOriginalWidth());
+ w.setOriginalHeight(INFORMATION_CONTAINER_HEIGHT - parent.getOriginalHeight());
+ w.setOriginalY(parent.getOriginalHeight());
+
+ w.setFontId(FontID.PLAIN_11);
+ w.setTextShadowed(true);
+ w.setTextColor(FONT_COLOR);
+
+ // Need to adjust parent height so text is visible
+ parent.setOriginalHeight(INFORMATION_CONTAINER_HEIGHT);
+ parent.revalidate();
+
+ return w;
+ }
+
+ private void createWidgetButtons()
+ {
+ final Widget parent = client.getWidget(WidgetInfo.ITEMS_KEPT_INFORMATION_CONTAINER);
+ // Change the information container from a text widget to a layer
+ parent.setType(WidgetType.LAYER);
+ parent.deleteAllChildren();
+
+ // Ultimate Iron men are always skulled and can't use the protect item prayer
+ WidgetButton protectItemButton = isProtectItemAllowed()
+ ? new WidgetButton(parent, "Protect Item Prayer", PROTECT_ITEM_SPRITE_ID, protectingItem, selected ->
+ {
+ protectingItem = selected;
+ rebuildItemsKeptOnDeathInterface();
+ }) : null;
+
+ WidgetButton skulledButton = !isUltimateIronman()
+ ? new WidgetButton(parent, "Skulled", SKULL_SPRITE_ID, isSkulled, selected ->
+ {
+ isSkulled = selected;
+ rebuildItemsKeptOnDeathInterface();
+ }) : null;
+
+ lowWildyButton = new WidgetButton(parent, "Low Wildy (1-20)", SWORD_SPRITE_ID, wildyLevel > 0 && wildyLevel <= DEEP_WILDY, selected ->
+ {
+ if (!selected)
+ {
+ syncWildernessLevel();
+ }
+ else
+ {
+ wildyLevel = 1;
+ deepWildyButton.setSelected(false);
+ }
+
+ rebuildItemsKeptOnDeathInterface();
+ });
+
+ deepWildyButton = new WidgetButton(parent, "Deep Wildy (21+)", SKULL_2_SPRITE_ID, wildyLevel > DEEP_WILDY, selected ->
+ {
+ if (!selected)
+ {
+ syncWildernessLevel();
+ }
+ else
+ {
+ wildyLevel = DEEP_WILDY + 1;
+ lowWildyButton.setSelected(false);
+ }
+
+ rebuildItemsKeptOnDeathInterface();
+ });
+
+ parent.revalidate();
+ WidgetButton.layoutButtonsToContainer(parent, protectItemButton, skulledButton, lowWildyButton, deepWildyButton);
+ }
+
+ /**
+ * Creates an Item Widget for use inside the Kept on Death Interface
+ *
+ * @param qty Amount of item
+ * @param c Items Composition
+ * @return
+ */
+ private static Widget createItemWidget(final Widget parent, final int qty, final ItemDefinition c)
+ {
+ final Widget itemWidget = parent.createChild(-1, WidgetType.GRAPHIC);
+ itemWidget.setItemId(c.getId());
+ itemWidget.setItemQuantity(qty);
+ itemWidget.setHasListener(true);
+ itemWidget.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
+ itemWidget.setOriginalHeight(Constants.ITEM_SPRITE_HEIGHT);
+ itemWidget.setBorderType(1);
+
+ itemWidget.setAction(1, String.format("Item:
%s", c.getName()));
+
+ return itemWidget;
+ }
+}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/Pets.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/Pets.java
new file mode 100644
index 0000000000..de2b0edcb7
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/Pets.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2018 Abex
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.itemskeptondeath;
+
+import com.google.common.collect.ImmutableSet;
+import java.util.Set;
+import static net.runelite.api.ItemID.*;
+
+final class Pets
+{
+ private Pets()
+ {
+ }
+
+ private static final Set PETS = ImmutableSet.of(
+ BABY_MOLE,
+ PRINCE_BLACK_DRAGON,
+ PET_CORPOREAL_CRITTER, PET_DARK_CORE,
+ JALNIBREK, TZREKZUK,
+ KALPHITE_PRINCESS, KALPHITE_PRINCESS_12654,
+ LIL_ZIK,
+ SKOTOS,
+ PET_SNAKELING, PET_SNAKELING_12939, PET_SNAKELING_12940,
+ TZREKJAD,
+ VORKI,
+
+ OLMLET, PUPPADILE, TEKTINY, VANGUARD, VASA_MINIRIO, VESPINA,
+
+ PET_DAGANNOTH_PRIME, PET_DAGANNOTH_REX, PET_DAGANNOTH_SUPREME,
+
+ PET_GENERAL_GRAARDOR, PET_KRIL_TSUTSAROTH, PET_KREEARRA, PET_ZILYANA,
+
+ ABYSSAL_ORPHAN,
+ HELLPUPPY,
+ PET_KRAKEN,
+ MIDNIGHT, NOON,
+ PET_SMOKE_DEVIL, PET_SMOKE_DEVIL_22663,
+ IKKLE_HYDRA, IKKLE_HYDRA_22748, IKKLE_HYDRA_22750, IKKLE_HYDRA_22752,
+
+ CALLISTO_CUB,
+ PET_CHAOS_ELEMENTAL,
+ SCORPIAS_OFFSPRING,
+ VENENATIS_SPIDERLING,
+ VETION_JR, VETION_JR_13180,
+
+ BABY_CHINCHOMPA, BABY_CHINCHOMPA_13324, BABY_CHINCHOMPA_13325, BABY_CHINCHOMPA_13326,
+ BEAVER,
+ GIANT_SQUIRREL,
+ HERON,
+ RIFT_GUARDIAN, RIFT_GUARDIAN_20667, RIFT_GUARDIAN_20669, RIFT_GUARDIAN_20671, RIFT_GUARDIAN_20673, RIFT_GUARDIAN_20675,
+ RIFT_GUARDIAN_20677, RIFT_GUARDIAN_20679, RIFT_GUARDIAN_20681, RIFT_GUARDIAN_20683, RIFT_GUARDIAN_20685, RIFT_GUARDIAN_20687,
+ RIFT_GUARDIAN_20689, RIFT_GUARDIAN_20691, RIFT_GUARDIAN_21990,
+ ROCK_GOLEM, ROCK_GOLEM_21187, ROCK_GOLEM_21188, ROCK_GOLEM_21189, ROCK_GOLEM_21190, ROCK_GOLEM_21191, ROCK_GOLEM_21192,
+ ROCK_GOLEM_21193, ROCK_GOLEM_21194, ROCK_GOLEM_21195, ROCK_GOLEM_21196, ROCK_GOLEM_21197, ROCK_GOLEM_21340, ROCK_GOLEM_21358,
+ ROCK_GOLEM_21359, ROCK_GOLEM_21360,
+ ROCKY,
+ TANGLEROOT,
+
+ PET_KITTEN, PET_KITTEN_1556, PET_KITTEN_1557, PET_KITTEN_1558, PET_KITTEN_1559, PET_KITTEN_1560,
+ PET_CAT, PET_CAT_1562, PET_CAT_1563, PET_CAT_1564, PET_CAT_1565, PET_CAT_1566, PET_CAT_1567, PET_CAT_1568, PET_CAT_1569,
+ PET_CAT_1570, PET_CAT_1571, PET_CAT_1572,
+ LAZY_CAT, LAZY_CAT_6550, LAZY_CAT_6551, LAZY_CAT_6552, LAZY_CAT_6553, LAZY_CAT_6554,
+ WILY_CAT, WILY_CAT_6556, WILY_CAT_6557, WILY_CAT_6558, WILY_CAT_6559, WILY_CAT_6560,
+ OVERGROWN_HELLCAT, HELL_CAT, HELLKITTEN, LAZY_HELL_CAT, WILY_HELLCAT,
+
+ BLOODHOUND,
+ CHOMPY_CHICK,
+ HERBI,
+ PET_PENANCE_QUEEN,
+ PHOENIX
+ );
+
+ public static boolean isPet(int id)
+ {
+ return PETS.contains(id);
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/WidgetButton.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/WidgetButton.java
new file mode 100644
index 0000000000..93cb27e41c
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/WidgetButton.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2018, TheStonedTurtle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.itemskeptondeath;
+
+import net.runelite.api.ScriptEvent;
+import net.runelite.api.SpriteID;
+import net.runelite.api.widgets.JavaScriptCallback;
+import net.runelite.api.widgets.Widget;
+import net.runelite.api.widgets.WidgetType;
+
+class WidgetButton
+{
+ private static final int ICON_HEIGHT = 26;
+ private static final int ICON_WIDTH = 26;
+ private static final int BACKGROUND_HEIGHT = 32;
+ private static final int BACKGROUND_WIDTH = 32;
+ private static final int PADDING = 5;
+ private static final int ICON_PADDING = (BACKGROUND_HEIGHT - ICON_HEIGHT) / 2;
+
+ private static final int BACKGROUND_SPRITE_ID = SpriteID.EQUIPMENT_SLOT_TILE;
+ private static final int SELECTED_BACKGROUND_SPRITE_ID = SpriteID.EQUIPMENT_SLOT_SELECTED;
+
+ @FunctionalInterface
+ public interface WidgetButtonCallback
+ {
+ void run(boolean newState);
+ }
+
+ private final Widget parent;
+ private final String name;
+ private final int spriteID;
+ private boolean selected;
+ private final WidgetButtonCallback callback;
+
+ private Widget icon;
+ private Widget background;
+
+ WidgetButton(
+ final Widget parent,
+ final String name,
+ final int spriteID,
+ final boolean selectedStartState,
+ final WidgetButtonCallback callback)
+ {
+ this.parent = parent;
+ this.name = name;
+ this.spriteID = spriteID;
+ this.selected = selectedStartState;
+ this.callback = callback;
+ createBackgroundWidget();
+ createIconWidget();
+ }
+
+ private void createBackgroundWidget()
+ {
+ background = createWidget();
+ background.setOriginalWidth(BACKGROUND_WIDTH);
+ background.setOriginalHeight(BACKGROUND_HEIGHT);
+ syncBackgroundSprite();
+ }
+
+ private void createIconWidget()
+ {
+ icon = createWidget();
+ icon.setAction(1, "Toggle:");
+ icon.setOnOpListener((JavaScriptCallback) this::onButtonClicked);
+ icon.setOnMouseRepeatListener((JavaScriptCallback) e -> e.getSource().setOpacity(120));
+ icon.setOnMouseLeaveListener((JavaScriptCallback) e -> e.getSource().setOpacity(0));
+ icon.setHasListener(true);
+ icon.setSpriteId(spriteID);
+ }
+
+ private Widget createWidget()
+ {
+ final Widget w = parent.createChild(-1, WidgetType.GRAPHIC);
+ w.setOriginalWidth(ICON_WIDTH);
+ w.setOriginalHeight(ICON_HEIGHT);
+ w.setName("
" + this.name);
+ return w;
+ }
+
+ public void setSelected(boolean selected)
+ {
+ this.selected = selected;
+ syncBackgroundSprite();
+ }
+
+ private void syncBackgroundSprite()
+ {
+ background.setSpriteId(selected ? SELECTED_BACKGROUND_SPRITE_ID : BACKGROUND_SPRITE_ID);
+ }
+
+ /**
+ * Adds the collection of WidgetButtons to the container overriding any existing children.
+ *
+ * @param container Widget to add buttons too
+ * @param buttons buttons to add
+ */
+ static void layoutButtonsToContainer(final Widget container, final WidgetButton... buttons)
+ {
+ // Each button has two widgets, Icon and Background
+ final int xIncrement = BACKGROUND_WIDTH + PADDING;
+ final int yIncrement = BACKGROUND_HEIGHT + PADDING;
+ int maxRowItems = container.getWidth() / xIncrement;
+ // Ensure at least 1 button per row
+ maxRowItems = maxRowItems < 1 ? 1 : maxRowItems;
+
+ int index = 0;
+ for (final WidgetButton w : buttons)
+ {
+ if (w == null)
+ {
+ continue;
+ }
+
+ final int originalX = ((index % maxRowItems) * xIncrement);
+ final int originalY = ((index / maxRowItems) * yIncrement);
+ w.background.setOriginalX(originalX);
+ w.background.setOriginalY(originalY);
+ w.background.revalidate();
+
+ // Icon must be padded to center inside image
+ w.icon.setOriginalX(originalX + ICON_PADDING);
+ w.icon.setOriginalY(originalY + ICON_PADDING);
+ w.icon.revalidate();
+
+ index++;
+ }
+
+ final int numButtons = index;
+ final int rows = 1 + (numButtons > maxRowItems ? numButtons / maxRowItems : 0);
+ container.setOriginalHeight(yIncrement * rows);
+ container.revalidate();
+ }
+
+ private void onButtonClicked(ScriptEvent scriptEvent)
+ {
+ setSelected(!selected);
+ callback.run(selected);
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatConfig.java
index 34cec317a2..1bf4c37222 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatConfig.java
@@ -92,6 +92,16 @@ public interface ItemStatConfig extends Config
return false;
}
+ @ConfigItem(
+ keyName = "showWeight",
+ name = "Show Weight",
+ description = "Show weight in tooltip"
+ )
+ default boolean showWeight()
+ {
+ return true;
+ }
+
@ConfigItem(
keyName = "colorBetterUncapped",
name = "Better (Uncapped)",
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java
index 6af02ea31a..209e86aa41 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatOverlay.java
@@ -189,7 +189,10 @@ public class ItemStatOverlay extends Overlay
private String buildStatBonusString(ItemStats s)
{
final StringBuilder b = new StringBuilder();
- b.append(getChangeString("Weight", s.getWeight(), true, false));
+ if (config.showWeight())
+ {
+ b.append(getChangeString("Weight", s.getWeight(), true, false));
+ }
ItemStats other = null;
final ItemEquipmentStats currentEquipment = s.getEquipment();
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatPlugin.java
index 9c41fa5883..2b0e476677 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemstats/ItemStatPlugin.java
@@ -35,6 +35,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import net.runelite.api.Client;
+import net.runelite.api.Constants;
import net.runelite.api.FontID;
import net.runelite.api.InventoryID;
import net.runelite.api.Item;
@@ -232,8 +233,8 @@ public class ItemStatPlugin extends Plugin
Widget icon = invContainer.createChild(-1, WidgetType.GRAPHIC);
icon.setOriginalX(8);
icon.setOriginalY(yPos);
- icon.setOriginalWidth(36);
- icon.setOriginalHeight(32);
+ icon.setOriginalWidth(Constants.ITEM_SPRITE_WIDTH);
+ icon.setOriginalHeight(Constants.ITEM_SPRITE_HEIGHT);
icon.setItemId(id);
icon.setItemQuantityMode(0);
icon.setBorderType(1);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickConfig.java
index 35b699cba0..a10cee98c3 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickConfig.java
@@ -74,4 +74,15 @@ public interface LearnToClickConfig extends Config
{
return false;
}
+
+ @ConfigItem(
+ position = 5,
+ keyName = "hideOrbs",
+ name = "Hide Orbs",
+ description = "Completely hides the world map and special attack orbs"
+ )
+ default boolean hideOrbs()
+ {
+ return false;
+ }
}
\ No newline at end of file
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickPlugin.java
index c70dbb5faf..cea339008b 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/learntoclick/LearnToClickPlugin.java
@@ -10,13 +10,18 @@
package net.runelite.client.plugins.learntoclick;
+import com.google.common.collect.ImmutableList;
import com.google.inject.Provides;
import javax.inject.Inject;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.MenuEntry;
+import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuShouldLeftClick;
+import net.runelite.api.events.WidgetLoaded;
+import net.runelite.api.widgets.WidgetID;
+import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin;
@@ -36,6 +41,9 @@ import org.apache.commons.lang3.ArrayUtils;
@Slf4j
public class LearnToClickPlugin extends Plugin
{
+ private static final ImmutableList ORB_WIDGETS = ImmutableList.of(WidgetInfo.MINIMAP_WORLDMAP_ORB,
+ WidgetInfo.MINIMAP_SPEC_ORB);
+
@Inject
private LearnToClickConfig config;
private boolean forceRightClickFlag;
@@ -51,13 +59,44 @@ public class LearnToClickPlugin extends Plugin
@Override
protected void startUp() throws Exception
{
-
}
@Override
protected void shutDown() throws Exception
{
forceRightClickFlag = false;
+ hideOrbWidgets(false);
+ }
+
+ @Subscribe
+ public void onConfigChanged(ConfigChanged event)
+ {
+ if (!event.getGroup().equals("learntoclick") && !event.getKey().equals("hideOrbs"))
+ {
+ return;
+ }
+ if (config.hideOrbs())
+ {
+ hideOrbWidgets(true);
+ }
+ else
+ {
+ hideOrbWidgets(false);
+ }
+
+ }
+
+ @Subscribe
+ public void onWidgetLoaded(WidgetLoaded event)
+ {
+ if (!config.hideOrbs())
+ {
+ return;
+ }
+ if (event.getGroupId() == WidgetID.MINIMAP_GROUP_ID)
+ {
+ hideOrbWidgets(true);
+ }
}
@Subscribe
@@ -71,7 +110,10 @@ public class LearnToClickPlugin extends Plugin
MenuEntry[] menuEntries = client.getMenuEntries();
for (MenuEntry entry : menuEntries)
{
- if ((entry.getOption().equals("Floating") && config.shouldRightClickMap()) || (entry.getOption().equals("Hide") && config.shouldRightClickXp()) || (entry.getOption().equals("Show") && config.shouldRightClickXp()) || (entry.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
+ if ((entry.getOption().equals("Floating") && config.shouldRightClickMap()) ||
+ (entry.getOption().equals("Hide") && config.shouldRightClickXp()) || (entry.getOption().equals("Show")
+ && config.shouldRightClickXp()) || (entry.getOption().equals("Auto retaliate")
+ && config.shouldRightClickRetaliate()))
{
event.setForceRightClick(true);
return;
@@ -82,7 +124,9 @@ public class LearnToClickPlugin extends Plugin
@Subscribe
public void onMenuEntryAdded(MenuEntryAdded event)
{
- if ((event.getOption().equals("Floating") && config.shouldRightClickMap()) || (event.getOption().equals("Hide") && config.shouldRightClickXp()) || (event.getOption().equals("Show") && config.shouldRightClickXp()) || (event.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
+ if ((event.getOption().equals("Floating") && config.shouldRightClickMap()) || (event.getOption().equals("Hide")
+ && config.shouldRightClickXp()) || (event.getOption().equals("Show") && config.shouldRightClickXp()) ||
+ (event.getOption().equals("Auto retaliate") && config.shouldRightClickRetaliate()))
{
forceRightClickFlag = true;
}
@@ -99,6 +143,14 @@ public class LearnToClickPlugin extends Plugin
}
client.setMenuEntries(entries);
}
+ }
+ /**
+ * Toggles hiding the World map and special attack orb widgets
+ * @param hidden - hides the Widgets if true, un-hides them if false
+ */
+ private void hideOrbWidgets(boolean hidden)
+ {
+ ORB_WIDGETS.forEach(widgetInfo -> client.getWidget(widgetInfo).setHidden(hidden));
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/lootingbagviewer/LootingBagViewerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/lootingbagviewer/LootingBagViewerOverlay.java
index 461e752386..ecfe3dc5da 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/lootingbagviewer/LootingBagViewerOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/lootingbagviewer/LootingBagViewerOverlay.java
@@ -41,10 +41,10 @@ import net.runelite.client.ui.overlay.components.ComponentOrientation;
import net.runelite.client.ui.overlay.components.ImageComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
-class LootingBagViewerOverlay extends Overlay
+public class LootingBagViewerOverlay extends Overlay
{
private static final int INVENTORY_SIZE = 28;
- private static final int PLACEHOLDER_WIDTH = 36;
+ public static final int PLACEHOLDER_WIDTH = 36;
private static final int PLACEHOLDER_HEIGHT = 32;
private static final ImageComponent PLACEHOLDER_IMAGE = new ImageComponent(new BufferedImage(PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, BufferedImage.TYPE_4BYTE_ABGR));
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java
index 7d13fc6408..d4fd2aabf4 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperConfig.java
@@ -41,12 +41,14 @@ import net.runelite.client.plugins.menuentryswapper.util.MaxCapeMode;
import net.runelite.client.plugins.menuentryswapper.util.NecklaceOfPassageMode;
import net.runelite.client.plugins.menuentryswapper.util.ObeliskMode;
import net.runelite.client.plugins.menuentryswapper.util.OccultAltarMode;
+import net.runelite.client.plugins.menuentryswapper.util.QuestCapeMode;
import net.runelite.client.plugins.menuentryswapper.util.RingOfWealthMode;
import net.runelite.client.plugins.menuentryswapper.util.SkillsNecklaceMode;
import net.runelite.client.plugins.menuentryswapper.util.SlayerRingMode;
import net.runelite.client.plugins.menuentryswapper.util.XericsTalismanMode;
+
@ConfigGroup("menuentryswapper")
public interface MenuEntrySwapperConfig extends Config
{
@@ -293,6 +295,32 @@ public interface MenuEntrySwapperConfig extends Config
{
return true;
}
+
+ @ConfigItem(
+ keyName = "swapQuestCape",
+ name = "Swap Quest Cape",
+ description = "Enables swapping Quest cape options in worn interface.",
+ position = 19,
+ group = "Equipment swapper"
+ )
+ default boolean swapQuestCape()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ keyName = "questCapeMode",
+ name = "Mode",
+ description = "",
+ position = 20,
+ group = "Equipment swapper",
+ hidden = true,
+ unhide = "swapQuestCape"
+ )
+ default QuestCapeMode questCapeMode()
+ {
+ return QuestCapeMode.TELEPORT;
+ }
//------------------------------------------------------------//
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
index 09995ee46a..31af4a8239 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/MenuEntrySwapperPlugin.java
@@ -32,6 +32,7 @@ import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Provides;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -604,7 +605,10 @@ public class MenuEntrySwapperPlugin extends Plugin
}
}
- if (option.contains("buy"))
+ if ((option.contains("buy") || option.contains("value")) && Arrays.stream(entries).anyMatch(menuEntry ->
+ {
+ return menuEntry.getOption().toLowerCase().contains("buy");
+ }))
{
if (config.getSwapBuyOne() && !config.getBuyOneItems().equals(""))
{
@@ -650,7 +654,10 @@ public class MenuEntrySwapperPlugin extends Plugin
}
}
}
- else if (option.contains("sell"))
+ else if ((option.contains("sell") || option.contains("value")) && Arrays.stream(entries).anyMatch(menuEntry ->
+ {
+ return menuEntry.getOption().toLowerCase().contains("sell");
+ }))
{
if (config.getSwapSellOne() && !config.getSellOneItems().equals(""))
{
@@ -1421,6 +1428,10 @@ public class MenuEntrySwapperPlugin extends Plugin
{
menuManager.addSwap("remove", "max cape", config.maxMode().toString());
}
+ if (config.swapQuestCape())
+ {
+ menuManager.addSwap("remove", "quest point cape", config.questCapeMode().toString());
+ }
}
private void removeSwaps()
@@ -1437,6 +1448,9 @@ public class MenuEntrySwapperPlugin extends Plugin
menuManager.removeSwaps("slayer ring");
menuManager.removeSwaps("xeric's talisman");
menuManager.removeSwaps("ring of wealth");
+ menuManager.removeSwaps("max cape");
+ menuManager.removeSwaps("quest point cape");
+
}
private void delete(int target)
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/util/QuestCapeMode.java b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/util/QuestCapeMode.java
new file mode 100644
index 0000000000..813787bd10
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/menuentryswapper/util/QuestCapeMode.java
@@ -0,0 +1,20 @@
+package net.runelite.client.plugins.menuentryswapper.util;
+
+public enum QuestCapeMode
+{
+ TRIM("Trim"),
+ TELEPORT ("Teleport");
+
+ private final String name;
+
+ QuestCapeMode(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningOverlay.java
index 87e4e8a897..3ce12efcf7 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningOverlay.java
@@ -47,7 +47,7 @@ class MiningOverlay extends Overlay
{
// Range of Motherlode vein respawn time not 100% confirmed but based on observation
@Getter(AccessLevel.PACKAGE)
- private static final int ORE_VEIN_MAX_RESPAWN_TIME = 123;
+ public static final int ORE_VEIN_MAX_RESPAWN_TIME = 123;
private static final int ORE_VEIN_MIN_RESPAWN_TIME = 90;
private static final float ORE_VEIN_RANDOM_PERCENT_THRESHOLD = (float) ORE_VEIN_MIN_RESPAWN_TIME / ORE_VEIN_MAX_RESPAWN_TIME;
private static final Color DARK_GREEN = new Color(0, 100, 0);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java
index 4bc5232701..0c526222c3 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java
@@ -168,6 +168,7 @@ public class MiningPlugin extends Plugin
case ORE_VEIN_26663: // Motherlode vein
case ORE_VEIN_26664: // Motherlode vein
{
+ // If the vein respawns before the timer is up, remove it
final WorldPoint point = object.getWorldLocation();
respawns.removeIf(rockRespawn -> rockRespawn.getWorldPoint().equals(point));
break;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java
index 7f27596356..19207b7fd6 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java
@@ -49,6 +49,7 @@ import static net.runelite.api.ObjectID.ROCKS_11376;
import static net.runelite.api.ObjectID.ROCKS_11377;
import static net.runelite.api.ObjectID.ROCKS_11386;
import static net.runelite.api.ObjectID.ROCKS_11387;
+import static net.runelite.api.ObjectID.ASH_PILE;
enum Rock
{
@@ -98,8 +99,9 @@ enum Rock
return inMiningGuild ? Duration.ofMinutes(6) : super.respawnTime;
}
},
- ORE_VEIN(Duration.ofSeconds(MiningOverlay.getORE_VEIN_MAX_RESPAWN_TIME()), 150),
- AMETHYST(Duration.ofSeconds(75), 120);
+ ORE_VEIN(Duration.ofSeconds(MiningOverlay.ORE_VEIN_MAX_RESPAWN_TIME), 150),
+ AMETHYST(Duration.ofSeconds(75), 120),
+ ASH_VEIN(Duration.ofSeconds(30), 0, ASH_PILE);
private static final Map ROCKS;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/Performance.java b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/Performance.java
new file mode 100644
index 0000000000..cc81fa1bfb
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/Performance.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2019, TheStonedTurtle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.performancestats;
+
+import lombok.Getter;
+import lombok.Setter;
+import net.runelite.http.api.ws.messages.party.PartyMemberMessage;
+
+@Getter
+class Performance extends PartyMemberMessage
+{
+ private static final double TICK_LENGTH = 0.6;
+
+ @Setter
+ String username;
+
+ double damageDealt = 0;
+ double highestHitDealt = 0;
+
+ double damageTaken = 0;
+ double highestHitTaken = 0;
+
+ int lastActivityTick = -1;
+ @Setter
+ double ticksSpent = 0;
+
+ void addDamageDealt(double a, int currentTick)
+ {
+ damageDealt += a;
+ if (a > highestHitDealt)
+ {
+ highestHitDealt = a;
+ }
+
+ this.lastActivityTick = currentTick;
+ }
+
+ void addDamageTaken(double a, int currentTick)
+ {
+ damageTaken += a;
+ if (a > highestHitTaken)
+ {
+ highestHitTaken = a;
+ }
+
+ this.lastActivityTick = currentTick;
+ }
+
+ void incrementTicksSpent()
+ {
+ ticksSpent++;
+ }
+
+ void reset()
+ {
+ damageDealt = 0;
+ highestHitDealt = 0;
+ damageTaken = 0;
+ highestHitTaken = 0;
+ lastActivityTick = -1;
+ ticksSpent = 0;
+ }
+
+ double getSecondsSpent()
+ {
+ return Math.round(this.ticksSpent * TICK_LENGTH);
+ }
+
+ double getDPS()
+ {
+ return Math.round( (this.damageDealt / this.getSecondsSpent()) * 100) / 100.00;
+ }
+
+ String getHumanReadableSecondsSpent()
+ {
+ final double secondsSpent = getSecondsSpent();
+ if (secondsSpent <= 60)
+ {
+ return String.format("%2.0f", secondsSpent) + "s";
+ }
+
+ final double s = secondsSpent % 3600 % 60;
+ final double m = Math.floor(secondsSpent % 3600 / 60);
+ final double h = Math.floor(secondsSpent / 3600);
+
+ return h < 1 ? String.format("%2.0f:%02.0f", m, s) : String.format("%2.0f:%02.0f:%02.0f", h, m, s);
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/inferno/InfernoWaveMonster.java b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsConfig.java
similarity index 70%
rename from runelite-client/src/main/java/net/runelite/client/plugins/inferno/InfernoWaveMonster.java
rename to runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsConfig.java
index 3c93005f37..1c6aea301d 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/inferno/InfernoWaveMonster.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Jordan Atwood
+ * Copyright (c) 2019, TheStonedTurtle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -22,29 +22,23 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package net.runelite.client.plugins.inferno;
+package net.runelite.client.plugins.performancestats;
-import lombok.AllArgsConstructor;
+import net.runelite.client.config.Config;
+import net.runelite.client.config.ConfigGroup;
+import net.runelite.client.config.ConfigItem;
-@AllArgsConstructor
-enum InfernoWaveMonster
+@ConfigGroup("performancestats")
+public interface PerformanceStatsConfig extends Config
{
-
- JAL_NIB("Jal-Nib", 32),
- JAL_MEJRAH("Jal-MejRah", 85),
- JAL_AK("Jal-Ak", 165),
- JAL_IMKOT("Jal-ImKot", 240),
- JAL_XIL("Jal-XIL", 370),
- JAL_ZEK("Jal-Zek", 490),
- JALTOK_JAD("JalTok-Jad", 900),
- TZKAL_ZUK("TzKal-Zuk", 1400);
-
- private final String name;
- private final int level;
-
- @Override
- public String toString()
+ @ConfigItem(
+ position = 0,
+ keyName = "submitTimeout",
+ name = "Submit Timeout (seconds)",
+ description = "Submits after this many seconds of inactivity"
+ )
+ default int submitTimeout()
{
- return String.format("%s - Level %s", name, level);
+ return 30;
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsOverlay.java
new file mode 100644
index 0000000000..c2d2961034
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsOverlay.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2018, TheStonedTurtle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.performancestats;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import javax.inject.Inject;
+import net.runelite.api.MenuAction;
+import net.runelite.client.ui.overlay.Overlay;
+import net.runelite.client.ui.overlay.OverlayMenuEntry;
+import net.runelite.client.ui.overlay.OverlayPosition;
+import net.runelite.client.ui.overlay.OverlayPriority;
+import net.runelite.client.ui.overlay.components.ComponentConstants;
+import net.runelite.client.ui.overlay.components.PanelComponent;
+import net.runelite.client.ui.overlay.components.table.TableAlignment;
+import net.runelite.client.ui.overlay.components.table.TableComponent;
+
+public class PerformanceStatsOverlay extends Overlay
+{
+ private static final String TARGET = "Performance Stats";
+ private static final String[] COLUMNS = {
+ "Player", "Dealt", "Taken", "DPS", "Elapsed"
+ };
+
+ private final PerformanceStatsPlugin tracker;
+ private final PanelComponent panelComponent = new PanelComponent();
+ private final TableComponent tableComponent = new TableComponent();
+
+ @Inject
+ PerformanceStatsOverlay(PerformanceStatsPlugin tracker)
+ {
+ super(tracker);
+ setPosition(OverlayPosition.TOP_RIGHT);
+ setPriority(OverlayPriority.LOW);
+ this.tracker = tracker;
+
+ getMenuEntries().add(new OverlayMenuEntry(MenuAction.RUNELITE_OVERLAY, "Pause", TARGET));
+ getMenuEntries().add(new OverlayMenuEntry(MenuAction.RUNELITE_OVERLAY, "Reset", TARGET));
+ getMenuEntries().add(new OverlayMenuEntry(MenuAction.RUNELITE_OVERLAY, "Submit", TARGET));
+
+ panelComponent.setPreferredSize(new Dimension(350, 0));
+ panelComponent.setBackgroundColor(ComponentConstants.STANDARD_BACKGROUND_COLOR);
+
+ tableComponent.setDefaultAlignment(TableAlignment.CENTER);
+ tableComponent.setColumns(COLUMNS);
+
+ panelComponent.getChildren().add(tableComponent);
+ }
+
+ @Override
+ public String getName()
+ {
+ return TARGET;
+ }
+
+ @Override
+ public Dimension render(Graphics2D graphics)
+ {
+ if (!tracker.isEnabled())
+ {
+ return null;
+ }
+
+ final Performance performance = tracker.getPerformance();
+ graphics.setColor(Color.WHITE);
+
+ tableComponent.getRows().clear();
+
+ final String[] rowElements = createRowElements(performance);
+ tableComponent.addRow(rowElements);
+
+ for (Performance p : tracker.getPartyDataMap().values())
+ {
+ if (p.getMemberId().equals(performance.getMemberId()))
+ {
+ continue;
+ }
+
+ final String[] eles = createRowElements(p);
+ tableComponent.addRow(eles);
+ }
+
+ return panelComponent.render(graphics);
+ }
+
+ private String[] createRowElements(Performance performance)
+ {
+ return new String[]
+ {
+ performance.getUsername(),
+ String.valueOf((int) Math.round(performance.getDamageDealt())) + " | " + String.valueOf((int) Math.round(performance.getHighestHitDealt())),
+ String.valueOf((int) Math.round(performance.getDamageTaken())) + " | " + String.valueOf((int) Math.round(performance.getHighestHitTaken())),
+ String.valueOf(performance.getDPS()),
+ performance.getHumanReadableSecondsSpent()
+ };
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsPlugin.java
new file mode 100644
index 0000000000..fa3e7fd530
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/performancestats/PerformanceStatsPlugin.java
@@ -0,0 +1,452 @@
+/*
+ * Copyright (c) 2018, TheStonedTurtle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.performancestats;
+
+import com.google.inject.Provides;
+import java.text.DecimalFormat;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import javax.inject.Inject;
+import lombok.Getter;
+import lombok.extern.slf4j.Slf4j;
+import net.runelite.api.Actor;
+import net.runelite.api.ChatMessageType;
+import net.runelite.api.Client;
+import net.runelite.api.NPC;
+import net.runelite.api.Skill;
+import net.runelite.api.WorldType;
+import net.runelite.api.events.ExperienceChanged;
+import net.runelite.api.events.GameStateChanged;
+import net.runelite.api.events.GameTick;
+import net.runelite.api.events.HitsplatApplied;
+import net.runelite.api.events.ScriptCallbackEvent;
+import net.runelite.client.chat.ChatColorType;
+import net.runelite.client.chat.ChatMessageBuilder;
+import net.runelite.client.chat.ChatMessageManager;
+import net.runelite.client.chat.QueuedMessage;
+import net.runelite.client.config.ConfigManager;
+import net.runelite.client.eventbus.Subscribe;
+import net.runelite.client.events.OverlayMenuClicked;
+import net.runelite.client.events.PartyChanged;
+import net.runelite.client.game.NPCManager;
+import net.runelite.client.plugins.Plugin;
+import net.runelite.client.plugins.PluginDescriptor;
+import net.runelite.client.plugins.PluginType;
+import net.runelite.client.ui.overlay.OverlayManager;
+import net.runelite.client.util.Text;
+import net.runelite.client.ws.PartyMember;
+import net.runelite.client.ws.PartyService;
+import net.runelite.client.ws.WSClient;
+import net.runelite.http.api.ws.messages.party.UserPart;
+import net.runelite.http.api.ws.messages.party.UserSync;
+
+@PluginDescriptor(
+ name = "Performance Stats",
+ description = "Displays your current performance stats",
+ tags = {"performance", "stats", "dps", "damage", "combat"},
+ type = PluginType.UTILITY,
+ enabledByDefault = false
+)
+@Slf4j
+public class PerformanceStatsPlugin extends Plugin
+{
+ // For every damage point dealt 1.33 experience is given to the player's hitpoints (base rate)
+ private static final double HITPOINT_RATIO = 1.33;
+ private static final double DMM_MULTIPLIER_RATIO = 10;
+
+ private static final double GAME_TICK_SECONDS = 0.6;
+ private static final DecimalFormat numberFormat = new DecimalFormat("#,###");
+
+ @Inject
+ private Client client;
+
+ @Inject
+ private ChatMessageManager chatMessageManager;
+
+ @Inject
+ private PerformanceStatsConfig config;
+
+ @Inject
+ private PerformanceStatsOverlay performanceTrackerOverlay;
+
+ @Inject
+ private OverlayManager overlayManager;
+
+ @Inject
+ private NPCManager npcManager;
+
+ @Inject
+ private PartyService partyService;
+
+ @Inject
+ private WSClient wsClient;
+
+ @Getter
+ private boolean enabled = false;
+ @Getter
+ private boolean paused = false;
+ @Getter
+ private final Performance performance = new Performance();
+
+ // Keep track of actor last tick as sometimes getInteracting can return null when hp xp event is triggered
+ // as the player clicked away at the perfect time
+ private Actor oldTarget;
+ private double hpExp;
+ private boolean hopping;
+ private int pausedTicks = 0;
+
+ // Party System
+ @Getter
+ private final Map partyDataMap = Collections.synchronizedMap(new HashMap<>());
+
+ @Provides
+ PerformanceStatsConfig getConfig(ConfigManager configManager)
+ {
+ return configManager.getConfig(PerformanceStatsConfig.class);
+ }
+
+ @Override
+ protected void startUp()
+ {
+ overlayManager.add(performanceTrackerOverlay);
+ wsClient.registerMessage(Performance.class);
+ }
+
+ @Override
+ protected void shutDown()
+ {
+ overlayManager.remove(performanceTrackerOverlay);
+ wsClient.unregisterMessage(Performance.class);
+ disable();
+ reset();
+ }
+
+ @Subscribe
+ public void onGameStateChanged(GameStateChanged event)
+ {
+ switch (event.getGameState())
+ {
+ case LOGIN_SCREEN:
+ disable();
+ break;
+ case HOPPING:
+ hopping = true;
+ break;
+ }
+ }
+
+ @Subscribe
+ public void onHitsplatApplied(HitsplatApplied e)
+ {
+ if (isPaused())
+ {
+ return;
+ }
+
+ if (e.getActor().equals(client.getLocalPlayer()))
+ {
+ // Auto enables when hitsplat is applied to player
+ if (!isEnabled())
+ {
+ enable();
+ }
+
+ performance.addDamageTaken(e.getHitsplat().getAmount(), client.getTickCount());
+ }
+ }
+
+ @Subscribe
+ public void onExperienceChanged(ExperienceChanged c)
+ {
+ if (isPaused() || hopping)
+ {
+ return;
+ }
+
+ if (c.getSkill().equals(Skill.HITPOINTS))
+ {
+ final double oldExp = hpExp;
+ hpExp = client.getSkillExperience(Skill.HITPOINTS);
+
+ // Ignore initial login
+ if (client.getTickCount() < 2)
+ {
+ return;
+ }
+
+ final double diff = hpExp - oldExp;
+ if (diff < 1)
+ {
+ return;
+ }
+
+ // Auto enables when player receives hp exp
+ if (!isEnabled())
+ {
+ enable();
+ }
+
+ final double damageDealt = calculateDamageDealt(diff);
+ performance.addDamageDealt(damageDealt, client.getTickCount());
+ }
+ }
+
+ @Subscribe
+ public void onScriptCallbackEvent(ScriptCallbackEvent e)
+ {
+ // Handles Fake XP drops (Ironman in PvP, DMM Cap, 200m xp, etc)
+ if (isPaused())
+ {
+ return;
+ }
+
+ if (!"fakeXpDrop".equals(e.getEventName()))
+ {
+ return;
+ }
+
+ final int[] intStack = client.getIntStack();
+ final int intStackSize = client.getIntStackSize();
+
+ final int skillId = intStack[intStackSize - 2];
+ final Skill skill = Skill.values()[skillId];
+ if (skill.equals(Skill.HITPOINTS))
+ {
+ // Auto enables when player would have received hp exp
+ if (!isEnabled())
+ {
+ enable();
+ }
+
+ final int exp = intStack[intStackSize - 1];
+ performance.addDamageDealt(calculateDamageDealt(exp), client.getTickCount());
+ }
+ }
+
+ @Subscribe
+ public void onGameTick(GameTick t)
+ {
+ oldTarget = client.getLocalPlayer().getInteracting();
+
+ if (!isEnabled())
+ {
+ return;
+ }
+
+ if (isPaused())
+ {
+ pausedTicks++;
+ return;
+ }
+
+ performance.incrementTicksSpent();
+ hopping = false;
+
+ final int timeout = config.submitTimeout();
+ if (timeout > 0)
+ {
+ final double tickTimeout = timeout / GAME_TICK_SECONDS;
+ final int activityDiff = (client.getTickCount() - pausedTicks) - performance.getLastActivityTick();
+ if (activityDiff > tickTimeout)
+ {
+ // offset the tracker time to account for idle timeout
+ // Leave an additional tick to pad elapsed time
+ final double offset = tickTimeout - GAME_TICK_SECONDS;
+ performance.setTicksSpent(performance.getTicksSpent() - offset);
+
+ submit();
+ }
+ }
+
+ final String name = client.getLocalPlayer().getName();
+ performance.setUsername(Text.removeTags(name));
+ sendPerformance();
+ }
+
+ @Subscribe
+ public void onOverlayMenuClicked(OverlayMenuClicked c)
+ {
+ if (!c.getOverlay().equals(performanceTrackerOverlay))
+ {
+ return;
+ }
+
+ switch (c.getEntry().getOption())
+ {
+ case "Pause":
+ togglePaused();
+ break;
+ case "Reset":
+ reset();
+ break;
+ case "Submit":
+ submit();
+ break;
+ }
+ }
+
+ private void enable()
+ {
+ this.enabled = true;
+ hpExp = client.getSkillExperience(Skill.HITPOINTS);
+ }
+
+ private void disable()
+ {
+ this.enabled = false;
+ }
+
+ private void togglePaused()
+ {
+ this.paused = !this.paused;
+ }
+
+ private void reset()
+ {
+ this.enabled = false;
+ this.paused = false;
+
+ this.performance.reset();
+ pausedTicks = 0;
+ }
+
+ private void submit()
+ {
+ final String message = createPerformanceMessage(performance);
+
+ chatMessageManager.queue(QueuedMessage.builder()
+ .type(ChatMessageType.GAMEMESSAGE)
+ .runeLiteFormattedMessage(message)
+ .build());
+
+ reset();
+ }
+
+ /**
+ * Calculates damage dealt based on HP xp gained accounting for multipliers such as DMM mode
+ * @param diff HP xp gained
+ * @return damage dealt
+ */
+ private double calculateDamageDealt(double diff)
+ {
+ double damageDealt = diff / HITPOINT_RATIO;
+ // DeadMan mode has an XP modifier
+ if (client.getWorldType().contains(WorldType.DEADMAN))
+ {
+ damageDealt = damageDealt / DMM_MULTIPLIER_RATIO;
+ }
+
+ // Some NPCs have an XP modifier, account for it here.
+ Actor a = client.getLocalPlayer().getInteracting();
+ if (!(a instanceof NPC))
+ {
+ // If we are interacting with nothing we may have clicked away at the perfect time fall back to last tick
+ if (!(oldTarget instanceof NPC))
+ {
+ log.warn("Couldn't find current or past target for experienced gain...");
+ return damageDealt;
+ }
+
+ a = oldTarget;
+ }
+
+ final int npcId = ((NPC) a).getId();
+ return damageDealt / npcManager.getXpModifier(npcId);
+ }
+
+ private String createPerformanceMessage(final Performance p)
+ {
+ // Expected result: Damage Dealt: ## (Max: ##), Damage Taken: ## (Max: ##), Time Spent: ##:## (DPS: ##.##)
+ return new ChatMessageBuilder()
+ .append(ChatColorType.NORMAL)
+ .append("Damage dealt: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(numberFormat.format(p.getDamageDealt()))
+ .append(ChatColorType.NORMAL)
+ .append(" (Max: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(numberFormat.format(p.getHighestHitDealt()))
+ .append(ChatColorType.NORMAL)
+ .append("), Damage Taken: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(numberFormat.format(p.getDamageTaken()))
+ .append(ChatColorType.NORMAL)
+ .append(" (Max: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(numberFormat.format(p.getHighestHitTaken()))
+ .append(ChatColorType.NORMAL)
+ .append("), Time Spent: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(p.getHumanReadableSecondsSpent())
+ .append(ChatColorType.NORMAL)
+ .append(" (DPS: ")
+ .append(ChatColorType.HIGHLIGHT)
+ .append(String.valueOf(p.getDPS()))
+ .append(ChatColorType.NORMAL)
+ .append(")")
+ .build();
+ }
+
+ private void sendPerformance()
+ {
+ final PartyMember me = partyService.getLocalMember();
+ if (me != null && me.getMemberId() != null)
+ {
+ performance.setMemberId(me.getMemberId());
+ wsClient.send(performance);
+ }
+ }
+
+ @Subscribe
+ public void onPerformance(final Performance performance)
+ {
+ partyDataMap.put(performance.getMemberId(), performance);
+ }
+
+ @Subscribe
+ public void onUserSync(final UserSync event)
+ {
+ if (isEnabled())
+ {
+ sendPerformance();
+ }
+ }
+
+ @Subscribe
+ public void onUserPart(final UserPart event)
+ {
+ partyDataMap.remove(event.getMemberId());
+ }
+
+ @Subscribe
+ public void onPartyChanged(final PartyChanged event)
+ {
+ // Reset party
+ partyDataMap.clear();
+ }
+
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java
index 6b3dfc3d4e..2bf360fdc2 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/playerindicators/PlayerIndicatorsPlugin.java
@@ -281,7 +281,7 @@ public class PlayerIndicatorsPlugin extends Plugin
{
color = config.getTeamMemberColor();
}
- else if (!player.isClanMember() && !player.isFriend() && !PvPUtil.isAttackable(client, player))
+ else if (config.highlightNonClanMembers() && !player.isClanMember() && !player.isFriend() && !PvPUtil.isAttackable(client, player))
{
color = config.getNonClanMemberColor();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PlayerCountOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PlayerCountOverlay.java
new file mode 100644
index 0000000000..1952838914
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PlayerCountOverlay.java
@@ -0,0 +1,77 @@
+/*
+ * ******************************************************************************
+ * * Copyright (c) 2019 RuneLitePlus
+ * * Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file.
+ * * If there are any questions comments, or feedback about this software, please direct all inquiries directly to the file authors:
+ * * ST0NEWALL#9112
+ * * RuneLitePlus Discord: https://discord.gg/Q7wFtCe
+ * * RuneLitePlus website: https://runelitepl.us
+ * *****************************************************************************
+ */
+
+package net.runelite.client.plugins.pvptools;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.util.Arrays;
+import javax.inject.Inject;
+import net.runelite.api.Client;
+import net.runelite.api.Varbits;
+import net.runelite.api.WorldType;
+import net.runelite.client.ui.overlay.Overlay;
+import net.runelite.client.ui.overlay.OverlayLayer;
+import net.runelite.client.ui.overlay.OverlayPosition;
+import net.runelite.client.ui.overlay.OverlayPriority;
+import net.runelite.client.ui.overlay.components.table.TableComponent;
+import net.runelite.client.ui.overlay.components.table.TableElement;
+import net.runelite.client.ui.overlay.components.table.TableRow;
+import org.apache.commons.lang3.ArrayUtils;
+
+public class PlayerCountOverlay extends Overlay
+{
+ private static int[] CLAN_WARS_REGIONS = {9520, 13135, 13134, 13133, 13131, 13130, 13387, 13386};
+
+ private final PvpToolsPlugin pvpToolsPlugin;
+ private final PvpToolsConfig config;
+ private final Client client;
+
+
+ @Inject
+ public PlayerCountOverlay(PvpToolsPlugin pvpToolsPlugin, PvpToolsConfig pvpToolsConfig, Client client)
+ {
+ this.pvpToolsPlugin = pvpToolsPlugin;
+ this.config = pvpToolsConfig;
+ this.client = client;
+ setLayer(OverlayLayer.ABOVE_WIDGETS);
+ setPriority(OverlayPriority.HIGHEST);
+ setPosition(OverlayPosition.TOP_LEFT);
+ this.setPreferredPosition(OverlayPosition.TOP_LEFT);
+ }
+
+ @Override
+ public Dimension render(Graphics2D graphics)
+ {
+ if (config.countPlayers())
+ {
+ if ((client.getVar(Varbits.IN_WILDERNESS) == 1) || WorldType.isPvpWorld(client.getWorldType())
+ || ArrayUtils.contains(CLAN_WARS_REGIONS, client.getMapRegions()[0]) ||
+ WorldType.isDeadmanWorld(client.getWorldType()))
+ {
+ // Make this stop showing up when its not relevant
+ TableComponent tableComponent = new TableComponent();
+ TableElement[] firstRowElements = {
+ TableElement.builder().content("Friendly").color(Color.GREEN).build(),
+ TableElement.builder().content(String.valueOf(pvpToolsPlugin.getFriendlyPlayerCount())).build()};
+ TableRow firstRow = TableRow.builder().elements(Arrays.asList(firstRowElements)).build();
+ TableElement[] secondRowElements = {
+ TableElement.builder().content("Enemy").color(Color.RED).build(),
+ TableElement.builder().content(String.valueOf(pvpToolsPlugin.getEnemyPlayerCount())).build()};
+ TableRow secondRow = TableRow.builder().elements(Arrays.asList(secondRowElements)).build();
+ tableComponent.addRows(firstRow, secondRow);
+ return tableComponent.render(graphics);
+ }
+ }
+ return null;
+ }
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java
index 1b9856210d..39ed25ccda 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/pvptools/PvpToolsPlugin.java
@@ -78,6 +78,9 @@ public class PvpToolsPlugin extends Plugin
@Inject
PvpToolsOverlay pvpToolsOverlay;
+ @Inject
+ PlayerCountOverlay playerCountOverlay;
+
boolean fallinHelperEnabled = false;
private PvpToolsPanel panel;
private MissingPlayersJFrame missingPlayersJFrame;
@@ -185,6 +188,10 @@ public class PvpToolsPlugin extends Plugin
private int[] overheadCount = new int[]{0, 0, 0};
private List ignoredSpells = new ArrayList();
+ @Getter
+ private int enemyPlayerCount = 0;
+ @Getter
+ private int friendlyPlayerCount = 0;
private List getMissingMembers()
{
@@ -241,6 +248,7 @@ public class PvpToolsPlugin extends Plugin
protected void startUp() throws Exception
{
overlayManager.add(pvpToolsOverlay);
+ overlayManager.add(playerCountOverlay);
keyManager.registerKeyListener(fallinHotkeyListener);
keyManager.registerKeyListener(renderselfHotkeyListener);
@@ -278,6 +286,7 @@ public class PvpToolsPlugin extends Plugin
protected void shutDown() throws Exception
{
overlayManager.remove(pvpToolsOverlay);
+ overlayManager.remove(playerCountOverlay);
keyManager.unregisterKeyListener(fallinHotkeyListener);
keyManager.unregisterKeyListener(renderselfHotkeyListener);
clientToolbar.removeNavigation(navButton);
@@ -534,35 +543,37 @@ public class PvpToolsPlugin extends Plugin
panel.numMeleeJLabel.repaint();
}
- /**
- *
- */
+
private void updatePlayers()
{
+ friendlyPlayerCount = 0;
+ enemyPlayerCount = 0;
if (config.countPlayers())
{
- int cc = 0;
- int other = 0;
for (Player p : client.getPlayers())
{
if (Objects.nonNull(p))
{
+ if (p.equals(client.getLocalPlayer()))
+ {
+ continue;
+ }
if (PvPUtil.isAttackable(client, p))
{
if (p.isClanMember())
{
- cc++;
+ friendlyPlayerCount++;
}
else
{
- other++;
+ enemyPlayerCount++;
}
}
}
}
- panel.numOther.setText(htmlLabel("Other Player Count: ", String.valueOf(other)));
- panel.numCC.setText(htmlLabel("Friendly Player Count: ", String.valueOf(cc)));
+ panel.numOther.setText(htmlLabel("Other Player Count: ", String.valueOf(enemyPlayerCount)));
+ panel.numCC.setText(htmlLabel("Friendly Player Count: ", String.valueOf(friendlyPlayerCount)));
panel.numCC.repaint();
panel.numOther.repaint();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/Raid.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/Raid.java
index a0baabe691..69feb04fca 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/Raid.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/Raid.java
@@ -40,7 +40,7 @@ public class Raid
@Getter
private Layout layout;
- public void updateLayout(Layout layout)
+ void updateLayout(Layout layout)
{
if (layout == null)
{
@@ -83,7 +83,7 @@ public class Raid
return rooms[position];
}
- public void setRoom(RaidRoom room, int position)
+ void setRoom(RaidRoom room, int position)
{
if (position < rooms.length)
{
@@ -91,7 +91,7 @@ public class Raid
}
}
- public RaidRoom[] getCombatRooms()
+ RaidRoom[] getCombatRooms()
{
List combatRooms = new ArrayList<>();
@@ -111,12 +111,34 @@ public class Raid
return combatRooms.toArray(new RaidRoom[combatRooms.size()]);
}
- public String getRotationString()
+ String getRotationString()
{
return Joiner.on(",").join(Arrays.stream(getCombatRooms()).map(r -> r.getBoss().getName()).toArray());
}
- public String toCode()
+ private RaidRoom[] getAllRooms()
+ {
+ List getAllRooms = new ArrayList<>();
+
+ for (Room room : layout.getRooms())
+ {
+ if (room == null)
+ {
+ continue;
+ }
+
+ getAllRooms.add(rooms[room.getPosition()]);
+ }
+
+ return getAllRooms.toArray(new RaidRoom[0]);
+ }
+
+ String getFullRotationString()
+ {
+ return Joiner.on(",").join(Arrays.stream(getAllRooms()).toArray());
+ }
+
+ String toCode()
{
StringBuilder builder = new StringBuilder();
@@ -135,7 +157,7 @@ public class Raid
return builder.toString();
}
- public String toRoomString()
+ String toRoomString()
{
final StringBuilder sb = new StringBuilder();
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidRoom.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidRoom.java
index 23df0ff407..aa2fd9e162 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidRoom.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidRoom.java
@@ -31,7 +31,46 @@ import net.runelite.api.Tile;
public class RaidRoom
{
- public static final int ROOM_MAX_SIZE = 32;
+ static final int ROOM_MAX_SIZE = 32;
+ @Getter
+ private final Tile base;
+ @Getter
+ @Setter
+ private Type type;
+ @Getter
+ @Setter
+ private Boss boss;
+ @Getter
+ @Setter
+ private Puzzle puzzle;
+ @Getter
+ @Setter
+ private RaidRoom previousRoom;
+ @Getter
+ @Setter
+ private RaidRoom nextRoom;
+
+ RaidRoom(Tile base, Type type)
+ {
+ this.base = base;
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ switch (type)
+ {
+ case COMBAT:
+ return " " + type.getName() + " - " + boss.getName();
+
+ case PUZZLE:
+ return " " + type.getName() + " - " + puzzle.getName();
+
+ default:
+ return " " + type.getName();
+ }
+ }
@AllArgsConstructor
public enum Type
@@ -119,49 +158,4 @@ public class RaidRoom
return null;
}
}
-
- @Getter
- private final Tile base;
-
- @Getter
- @Setter
- private Type type;
-
- @Getter
- @Setter
- private Boss boss;
-
- @Getter
- @Setter
- private Puzzle puzzle;
-
- @Getter
- @Setter
- private RaidRoom previousRoom;
-
- @Getter
- @Setter
- private RaidRoom nextRoom;
-
- public RaidRoom(Tile base, Type type)
- {
- this.base = base;
- this.type = type;
- }
-
- @Override
- public String toString()
- {
- switch (type)
- {
- case COMBAT:
- return "RaidRoom (type: " + type.getName() + ", " + boss.getName() + ")";
-
- case PUZZLE:
- return "RaidRoom (type: " + type.getName() + ", " + puzzle.getName() + ")";
-
- default:
- return "RaidRoom (type: " + type.getName() + ")";
- }
- }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java
index 6911123fce..dec84b0a5f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsConfig.java
@@ -29,6 +29,7 @@ import java.awt.Color;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
+import net.runelite.client.config.Keybind;
import net.runelite.client.config.Stub;
@ConfigGroup("raids")
@@ -58,6 +59,18 @@ public interface RaidsConfig extends Config
return true;
}
+ @ConfigItem(
+ position = 2,
+ parent = "scouterConfig",
+ keyName = "hideBackground",
+ name = "Hide Scouter Background",
+ description = "Removes the scouter background, and makes it transparent."
+ )
+ default boolean hideBackground()
+ {
+ return true;
+ }
+
@ConfigItem(
position = 2,
parent = "scouterConfig",
@@ -184,32 +197,6 @@ public interface RaidsConfig extends Config
@ConfigItem(
position = 12,
parent = "scouterConfig",
- keyName = "colorTightrope",
- name = "Color tightrope",
- description = "Colors tightrope a separate color"
- )
- default boolean colorTightrope()
- {
- return true;
- }
-
- @ConfigItem(
- position = 13,
- parent = "scouterConfig",
- keyName = "tightropeColor",
- name = "Tightrope color",
- description = "The color of tightropes",
- hidden = true,
- unhide = "colorTightrope"
- )
- default Color tightropeColor()
- {
- return Color.MAGENTA;
- }
-
- @ConfigItem(
- position = 14,
- parent = "scouterConfig",
keyName = "layoutMessage",
name = "Send raid layout message when entering raid",
description = "Sends game message with raid layout on entering new raid"
@@ -223,16 +210,69 @@ public interface RaidsConfig extends Config
keyName = "roomConfig",
name = "Room Config",
description = "",
- position = 15
+ position = 13
)
default Stub roomConfig()
{
return new Stub();
}
+ @ConfigItem(
+ position = 14,
+ parent = "roomConfig",
+ keyName = "colorTightrope",
+ name = "Color tightrope",
+ description = "Colors tightrope a separate color"
+ )
+ default boolean colorTightrope()
+ {
+ return true;
+ }
+
+ @ConfigItem(
+ position = 15,
+ parent = "roomConfig",
+ keyName = "tightropeColor",
+ name = "Tightrope color",
+ description = "The color of tightropes",
+ hidden = true,
+ unhide = "colorTightrope"
+ )
+ default Color tightropeColor()
+ {
+ return Color.MAGENTA;
+ }
+
@ConfigItem(
position = 16,
parent = "roomConfig",
+ keyName = "crabHandler",
+ name = "Color crabs",
+ description = "If your crabs are good, it will color them to your set color." +
+ " If they are bad crabs, it will be set to RED"
+ )
+ default boolean crabHandler()
+ {
+ return false;
+ }
+
+ @ConfigItem(
+ position = 17,
+ parent = "roomConfig",
+ keyName = "crabColor",
+ name = "Crab color",
+ description = "The color of good crabs",
+ hidden = true,
+ unhide = "crabHandler"
+ )
+ default Color crabColor()
+ {
+ return Color.MAGENTA;
+ }
+
+ @ConfigItem(
+ position = 18,
+ parent = "roomConfig",
keyName = "enableRotationWhitelist",
name = "Enable rotation whitelist",
description = "Enable the rotation whitelist"
@@ -243,7 +283,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 17,
+ position = 19,
parent = "roomConfig",
keyName = "whitelistedRotations",
name = "Whitelisted rotations",
@@ -257,7 +297,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 18,
+ position = 20,
parent = "roomConfig",
keyName = "enableLayoutWhitelist",
name = "Enable layout whitelist",
@@ -269,7 +309,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 19,
+ position = 21,
parent = "roomConfig",
keyName = "whitelistedLayouts",
name = "Whitelisted layouts",
@@ -283,7 +323,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 20,
+ position = 22,
parent = "roomConfig",
keyName = "showScavsFarms",
name = "Show scavengers and farming",
@@ -295,7 +335,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 21,
+ position = 23,
parent = "roomConfig",
keyName = "scavsBeforeIce",
name = "Show last scavs for Ice Demon",
@@ -307,7 +347,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 22,
+ position = 24,
parent = "roomConfig",
keyName = "scavsBeforeOlm",
name = "Show last scavs for Olm",
@@ -319,7 +359,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 23,
+ position = 25,
parent = "roomConfig",
keyName = "scavPrepColor",
name = "Last scavs color",
@@ -331,7 +371,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 24,
+ position = 26,
parent = "roomConfig",
keyName = "whitelistedRooms",
name = "Whitelisted rooms",
@@ -346,7 +386,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 25,
+ position = 27,
parent = "roomConfig",
keyName = "blacklistedRooms",
name = "Blacklisted rooms",
@@ -364,7 +404,7 @@ public interface RaidsConfig extends Config
keyName = "hideRooms",
name = "Hide Rooms",
description = "",
- position = 26
+ position = 28
)
default Stub hideRooms()
{
@@ -372,7 +412,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 27,
+ position = 29,
parent = "hideRooms",
keyName = "hideRopeless",
name = "Hide no Tightrope raids",
@@ -384,7 +424,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 28,
+ position = 30,
parent = "hideRooms",
keyName = "hideVanguards",
name = "Hide Vanguard raids",
@@ -396,7 +436,7 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 29,
+ position = 31,
parent = "hideRooms",
keyName = "hideUnknownCombat",
name = "Hide Unknown combat raids",
@@ -408,13 +448,24 @@ public interface RaidsConfig extends Config
}
@ConfigItem(
- position = 30,
- keyName = "partyDisplay",
- name = "Party Info Display",
- description = "Display an overlay that shows information about the current party"
+ position = 32,
+ keyName = "partyDisplay",
+ name = "Party Info Display",
+ description = "Display an overlay that shows information about the current party"
)
default boolean partyDisplay()
{
return false;
}
+
+ @ConfigItem(
+ keyName = "hotkey",
+ name = "Toggle scout overlay",
+ description = "When pressed the scout overlay will be toggled. Must enable show scout overlay in raid",
+ position = 33
+ )
+ default Keybind hotkey()
+ {
+ return Keybind.NOT_SET;
+ }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java
index fddff0ea4f..3c15b0b678 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsOverlay.java
@@ -25,6 +25,7 @@
*/
package net.runelite.client.plugins.raids;
+import com.google.common.collect.ImmutableList;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
@@ -34,6 +35,8 @@ import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.inject.Inject;
import lombok.Getter;
import lombok.Setter;
@@ -49,6 +52,7 @@ import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayPriority;
+import net.runelite.client.ui.overlay.components.ComponentConstants;
import net.runelite.client.ui.overlay.components.ComponentOrientation;
import net.runelite.client.ui.overlay.components.ImageComponent;
import net.runelite.client.ui.overlay.components.PanelComponent;
@@ -65,21 +69,55 @@ public class RaidsOverlay extends Overlay
private static final int BORDER_OFFSET = 2;
private static final int ICON_SIZE = 32;
private static final int SMALL_ICON_SIZE = 21;
- //might need to edit these if they are not standard
private static final int TITLE_COMPONENT_HEIGHT = 20;
private static final int LINE_COMPONENT_HEIGHT = 16;
-
- private Client client;
- private RaidsPlugin plugin;
- private RaidsConfig config;
+ private static final Pattern FIRST_HALF = Pattern.compile("Start, (.*), End,");
+ private static final Pattern SECOND_HALF = Pattern.compile(", Start, (.*), End");
+ private static final ImmutableList goodCrabsFirst = ImmutableList.of(
+ "FSCCP.PCSCF - #WNWSWN#ESEENW",
+ "SCFCP.CSCFS - #ENEESW#ENWWSW",
+ "SCFPC.CSPCF - #WSWWNE#WSEENE",
+ "SCPFC.CCPSF - #NWWWSE#WNEESE",
+ "SCPFC.CSPCF - #NEEESW#WWNEEE",
+ "SCSPF.CCSPF - #ESWWNW#ESENES",
+ "SPCFC.CSPCF - #WWNEEE#WSWNWS",
+ "SCPFC.PCSCF - #WNEEES#NWSWNW", //rare crabs first bad crabs second
+ "SFCCPC.PCSCPF - #WSEENES#WWWNEEE", //good crabs first rare crabs second rare crabs third
+ "SCPFC.CCSSF - #NEESEN#WSWWNE" //good crabs
+ );
+ private static final ImmutableList goodCrabsSecond = ImmutableList.of(
+ "FSCCP.PCSCF - #WNWSWN#ESEENW",
+ "FSCCS.PCPSF - #WSEEEN#WSWNWS",
+ "FSCPC.CSCPF - #WNWWSE#EENWWW",
+ "SCFCP.CCSPF - #ESEENW#ESWWNW",
+ "SCFCP.CSCFS - #ENEESW#ENWWSW",
+ "SCFPC.CSPCF - #WSWWNE#WSEENE",
+ "SCFPC.PCCSF - #WSEENE#WWWSEE",
+ "SCFPC.SCPCF - #NESENE#WSWWNE",
+ "SCPFC.CCPSF - #NWWWSE#WNEESE",
+ "SCPFC.CSPCF - #NEEESW#WWNEEE",
+ "SCPFC.CSPSF - #WWSEEE#NWSWWN",
+ "SCSPF.CCSPF - #ESWWNW#ESENES",
+ "SFCCP.CSCPF - #WNEESE#NWSWWN",
+ "SFCCS.PCPSF - #ENWWSW#ENESEN",
+ "SPCFC.CSPCF - #WWNEEE#WSWNWS",
+ "SPCFC.SCCPF - #ESENES#WWWNEE",
+ "SPSFP.CCCSF - #NWSWWN#ESEENW", //bad crabs first good crabs second
+ "SFCCPC.PCSCPF - #WSEENES#WWWNEEE", //good crabs first rare crabs second rare crabs third
+ "FSCCP.PCSCF - #ENWWWS#NEESEN", //bad crabs first good crabs second
+ "SCPFC.CCSSF - #NEESEN#WSWWNE" //good crabs
+ );
private final PanelComponent panelComponent = new PanelComponent();
private final ItemManager itemManager;
private final SpriteManager spriteManager;
private final PanelComponent panelImages = new PanelComponent();
-
+ private Client client;
+ private RaidsPlugin plugin;
+ private RaidsConfig config;
@Setter
private boolean sharable = false;
+ @Getter
@Setter
private boolean scoutOverlayShown = false;
@@ -117,6 +155,15 @@ public class RaidsOverlay extends Overlay
scouterActive = false;
panelComponent.getChildren().clear();
+ if (config.hideBackground())
+ {
+ panelComponent.setBackgroundColor(null);
+ }
+ else
+ {
+ panelComponent.setBackgroundColor(ComponentConstants.STANDARD_BACKGROUND_COLOR);
+ }
+
if (plugin.getRaid() == null || plugin.getRaid().getLayout() == null)
{
panelComponent.getChildren().add(TitleComponent.builder()
@@ -145,6 +192,8 @@ public class RaidsOverlay extends Overlay
color = Color.RED;
}
+ Matcher firstMatcher = FIRST_HALF.matcher(plugin.getRaid().getFullRotationString());
+ Matcher secondMatcher = SECOND_HALF.matcher(plugin.getRaid().getFullRotationString());
int combatCount = 0;
int roomCount = 0;
List iceRooms = new ArrayList<>();
@@ -240,11 +289,32 @@ public class RaidsOverlay extends Overlay
scavsBeforeIceRooms.add(prev);
}
int lastScavs = scavRooms.get(scavRooms.size() - 1);
+
panelComponent.getChildren().add(TitleComponent.builder()
.text(displayLayout)
.color(color)
.build());
+ if (recordRaid())
+ {
+ panelComponent.getChildren().add(TitleComponent.builder()
+ .text("Record Raid")
+ .color(Color.GREEN)
+ .build());
+ panelComponent.setBackgroundColor(new Color(0, 255, 0, 10));
+ }
+ else
+ {
+ if (config.hideBackground())
+ {
+ panelComponent.setBackgroundColor(null);
+ }
+ else
+ {
+ panelComponent.setBackgroundColor(ComponentConstants.STANDARD_BACKGROUND_COLOR);
+ }
+ }
+
TableComponent tableComponent = new TableComponent();
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
@@ -254,7 +324,7 @@ public class RaidsOverlay extends Overlay
String clanOwner = Text.removeTags(client.getWidget(WidgetInfo.CLAN_CHAT_OWNER).getText());
if (clanOwner.equals("None"))
{
- clanOwner = "Open CC tab...";
+ clanOwner = "Open CC Tab";
color = Color.RED;
}
@@ -330,9 +400,22 @@ public class RaidsOverlay extends Overlay
{
color = config.tightropeColor();
}
+ if (config.crabHandler() && puzzleNameLC.equals("crabs"))
+ {
+ if (firstMatcher.find() && secondMatcher.find())
+ {
+ if (crabHandler(firstMatcher.group(1), secondMatcher.group(1)))
+ {
+ color = config.crabColor();
+ }
+ else
+ {
+ color = Color.RED;
+ }
+ }
+ }
tableComponent.addRow(config.showRecommendedItems() ? "" : room.getType().getName(), ColorUtil.prependColorTag(puzzleName, color));
-
break;
case FARMING:
if (config.showScavsFarms())
@@ -425,4 +508,26 @@ public class RaidsOverlay extends Overlay
}
return ImageUtil.resizeCanvas(bim, SMALL_ICON_SIZE, SMALL_ICON_SIZE);
}
+
+ private boolean crabHandler(String firstHalf, String secondHalf)
+ {
+ return (firstHalf.contains("Crabs") && goodCrabsFirst.contains(plugin.getLayoutFullCode()))
+ || (secondHalf.contains("Crabs") && goodCrabsSecond.contains(plugin.getLayoutFullCode()));
+ }
+
+ boolean recordRaid()
+ {
+ Matcher firstMatcher = FIRST_HALF.matcher(plugin.getRaid().getFullRotationString());
+ Matcher secondMatcher = SECOND_HALF.matcher(plugin.getRaid().getFullRotationString());
+ if (plugin.getRaid().getRotationString().toLowerCase().equals("vasa,tekton,vespula")
+ && plugin.getRaid().getFullRotationString().toLowerCase().contains("crabs")
+ && plugin.getRaid().getFullRotationString().toLowerCase().contains("tightrope"))
+ {
+ if (firstMatcher.find() && secondMatcher.find())
+ {
+ return (crabHandler(firstMatcher.group(1), secondMatcher.group(1)));
+ }
+ }
+ return false;
+ }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPanel.java
index 737d245b82..7c62909195 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPanel.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPanel.java
@@ -39,7 +39,7 @@ import net.runelite.client.callback.ClientThread;
import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.PluginPanel;
-public class RaidsPanel extends PluginPanel
+class RaidsPanel extends PluginPanel
{
@Inject
private Client client;
@@ -95,10 +95,6 @@ public class RaidsPanel extends PluginPanel
throw new RuntimeException(f);
}
}
- else
- {
- //TODO: User is still in a dc, or not logged in. Possibly provide a meaningful message somewhere.
- }
});
reloadScouter.addActionListener((ActionEvent e) ->
{
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPartyOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPartyOverlay.java
index 883c86dd26..85295b7083 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPartyOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPartyOverlay.java
@@ -24,22 +24,18 @@
*/
package net.runelite.client.plugins.raids;
+import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
-import java.awt.Color;
import java.util.Set;
import javax.inject.Inject;
-
-
+import net.runelite.api.ClanMember;
import net.runelite.api.Client;
import net.runelite.api.MenuAction;
import net.runelite.api.VarPlayer;
import net.runelite.api.Varbits;
-import net.runelite.api.ClanMember;
import net.runelite.client.ui.overlay.Overlay;
-
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
-
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayPriority;
@@ -50,18 +46,15 @@ import net.runelite.client.util.ColorUtil;
public class RaidsPartyOverlay extends Overlay
{
- public static final String PARTY_OVERLAY_RESET = "Reset missing";
- public static final String PARTY_OVERLAY_REFRESH = "Refresh party";
+ static final String PARTY_OVERLAY_RESET = "Reset missing";
+ static final String PARTY_OVERLAY_REFRESH = "Refresh party";
private final PanelComponent panelComponent = new PanelComponent();
-
+ private final PanelComponent panel = new PanelComponent();
@Inject
private Client client;
-
@Inject
private RaidsPlugin plugin;
- private final PanelComponent panel = new PanelComponent();
-
@Inject
private RaidsPartyOverlay(RaidsPlugin plugin)
{
@@ -97,7 +90,6 @@ public class RaidsPartyOverlay extends Overlay
tableComponent.setColumnAlignments(TableAlignment.LEFT, TableAlignment.RIGHT);
-
String partyCountString;
Color countColor = Color.WHITE;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java
index fa536f61c8..a2d08ab61f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java
@@ -34,8 +34,10 @@ import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -47,16 +49,16 @@ import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.InstanceTemplates;
import net.runelite.api.ItemID;
+import net.runelite.api.MenuAction;
import net.runelite.api.NullObjectID;
import static net.runelite.api.Perspective.SCENE_SIZE;
-import net.runelite.api.Point;
import net.runelite.api.Player;
+import net.runelite.api.Point;
import net.runelite.api.SpriteID;
import static net.runelite.api.SpriteID.TAB_QUESTS_BROWN_RAIDING_PARTY;
import net.runelite.api.Tile;
import net.runelite.api.VarPlayer;
import net.runelite.api.Varbits;
-import net.runelite.api.MenuAction;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.ClientTick;
import net.runelite.api.events.ConfigChanged;
@@ -71,8 +73,8 @@ import net.runelite.client.chat.ChatMessageManager;
import net.runelite.client.chat.QueuedMessage;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
-import net.runelite.client.game.ItemManager;
import net.runelite.client.events.OverlayMenuClicked;
+import net.runelite.client.game.ItemManager;
import net.runelite.client.game.SpriteManager;
import net.runelite.client.input.KeyManager;
import net.runelite.client.plugins.Plugin;
@@ -85,16 +87,15 @@ import net.runelite.client.ui.ClientToolbar;
import net.runelite.client.ui.DrawManager;
import net.runelite.client.ui.NavigationButton;
import net.runelite.client.ui.overlay.OverlayManager;
-import net.runelite.client.ui.overlay.WidgetOverlay;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
+import net.runelite.client.ui.overlay.WidgetOverlay;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import net.runelite.client.ui.overlay.tooltip.Tooltip;
import net.runelite.client.ui.overlay.tooltip.TooltipManager;
+import net.runelite.client.util.HotkeyListener;
import net.runelite.client.util.ImageUtil;
import net.runelite.client.util.Text;
import org.apache.commons.lang3.StringUtils;
-import java.util.HashSet;
-import java.util.Set;
@PluginDescriptor(
name = "Chambers Of Xeric",
@@ -107,109 +108,83 @@ import java.util.Set;
@Slf4j
public class RaidsPlugin extends Plugin
{
+ static final DecimalFormat POINTS_FORMAT = new DecimalFormat("#,###");
private static final int LOBBY_PLANE = 3;
private static final String RAID_START_MESSAGE = "The raid has begun!";
private static final String LEVEL_COMPLETE_MESSAGE = "level complete!";
private static final String RAID_COMPLETE_MESSAGE = "Congratulations - your raid is complete!";
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###.##");
- static final DecimalFormat POINTS_FORMAT = new DecimalFormat("#,###");
private static final String SPLIT_REGEX = "\\s*,\\s*";
private static final Pattern ROTATION_REGEX = Pattern.compile("\\[(.*?)]");
private static final int LINE_COMPONENT_HEIGHT = 16;
-
- @Inject
- private ItemManager itemManager;
private static final Pattern LEVEL_COMPLETE_REGEX = Pattern.compile("(.+) level complete! Duration: ([0-9:]+)");
private static final Pattern RAID_COMPLETE_REGEX = Pattern.compile("Congratulations - your raid is complete! Duration: ([0-9:]+)");
-
- @Inject
- private ChatMessageManager chatMessageManager;
-
- @Inject
- private InfoBoxManager infoBoxManager;
-
- @Inject
- private Client client;
-
- @Inject
- private DrawManager drawManager;
-
- @Inject
- private ScheduledExecutorService executor;
-
- @Inject
- private RaidsConfig config;
-
- @Inject
- private OverlayManager overlayManager;
-
- @Inject
- private RaidsOverlay overlay;
-
- @Inject
- private RaidsPointsOverlay pointsOverlay;
-
- @Inject
- private RaidsPartyOverlay partyOverlay;
-
- @Inject
- private LayoutSolver layoutSolver;
-
- @Inject
- private SpriteManager spriteManager;
-
- @Inject
- private ClientThread clientThread;
-
- @Inject
- private KeyManager keyManager;
-
- @Inject
- private TooltipManager tooltipManager;
-
@Getter
private final ArrayList roomWhitelist = new ArrayList<>();
-
@Getter
private final ArrayList roomBlacklist = new ArrayList<>();
-
@Getter
private final ArrayList rotationWhitelist = new ArrayList<>();
-
@Getter
private final ArrayList layoutWhitelist = new ArrayList<>();
-
@Getter
private final Map> recommendedItemsList = new HashMap<>();
-
+ public boolean canShow;
+ @Inject
+ private ChatMessageManager chatMessageManager;
+ @Inject
+ private InfoBoxManager infoBoxManager;
+ @Inject
+ private Client client;
+ @Inject
+ private DrawManager drawManager;
+ @Inject
+ private ScheduledExecutorService executor;
+ @Inject
+ private RaidsConfig config;
+ @Inject
+ private OverlayManager overlayManager;
+ @Inject
+ private RaidsOverlay overlay;
+ @Inject
+ private RaidsPointsOverlay pointsOverlay;
+ @Inject
+ private RaidsPartyOverlay partyOverlay;
+ @Inject
+ private LayoutSolver layoutSolver;
+ @Inject
+ private KeyManager keyManager;
+ @Inject
+ private SpriteManager spriteManager;
+ @Inject
+ private ClientThread clientThread;
+ @Inject
+ private TooltipManager tooltipManager;
@Getter
private Raid raid;
-
@Getter
private boolean inRaidChambers;
-
@Inject
private ClientToolbar clientToolbar;
- private RaidsPanel panel;
private int upperTime = -1;
private int middleTime = -1;
private int lowerTime = -1;
private int raidTime = -1;
private WidgetOverlay widgetOverlay;
private String tooltip;
- public boolean canShow;
+ @Inject
+ private ItemManager itemManager;
private NavigationButton navButton;
+ private boolean raidStarted;
+ @Getter
+ private String layoutFullCode;
private RaidsTimer timer;
-
@Getter
private int startPlayerCount;
-
@Getter
private List partyMembers = new ArrayList<>();
-
@Getter
private List startingPartyMembers = new ArrayList<>();
-
@Getter
private Set missingPartyMembers = new HashSet<>();
@@ -234,10 +209,11 @@ public class RaidsPlugin extends Plugin
{
overlayManager.add(partyOverlay);
}
+ keyManager.registerKeyListener(hotkeyListener);
updateLists();
clientThread.invokeLater(() -> checkRaidPresence(true));
widgetOverlay = overlayManager.getWidgetOverlay(WidgetInfo.RAIDS_POINTS_INFOBOX);
- panel = injector.getInstance(RaidsPanel.class);
+ RaidsPanel panel = injector.getInstance(RaidsPanel.class);
panel.init(config);
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(this.getClass(), "instancereloadhelper.png");
navButton = NavigationButton.builder()
@@ -260,8 +236,10 @@ public class RaidsPlugin extends Plugin
overlayManager.remove(partyOverlay);
}
infoBoxManager.removeInfoBox(timer);
+ keyManager.unregisterKeyListener(hotkeyListener);
inRaidChambers = false;
widgetOverlay = null;
+ raidStarted = false;
raid = null;
timer = null;
@@ -343,6 +321,7 @@ public class RaidsPlugin extends Plugin
{
timer = new RaidsTimer(spriteManager.getSprite(TAB_QUESTS_BROWN_RAIDING_PARTY, 0), this, Instant.now());
infoBoxManager.addInfoBox(timer);
+ raidStarted = true;
}
if (config.partyDisplay())
{
@@ -478,13 +457,12 @@ public class RaidsPlugin extends Plugin
}
}
-
@Subscribe
public void onOverlayMenuClicked(OverlayMenuClicked event)
{
OverlayMenuEntry entry = event.getEntry();
if (entry.getMenuAction() == MenuAction.RUNELITE_OVERLAY &&
- entry.getTarget().equals("Raids party overlay"))
+ entry.getTarget().equals("Raids party overlay"))
{
switch (entry.getOption())
{
@@ -566,7 +544,7 @@ public class RaidsPlugin extends Plugin
}
}
- public void checkRaidPresence(boolean force)
+ void checkRaidPresence(boolean force)
{
if (client.getGameState() != GameState.LOGGED_IN)
{
@@ -598,6 +576,8 @@ public class RaidsPlugin extends Plugin
return;
}
+ layoutFullCode = layout.getTest();
+ log.debug("Full Layout Code: " + layoutFullCode);
raid.updateLayout(layout);
RotationSolver.solve(raid.getCombatRooms());
overlay.setScoutOverlayShown(true);
@@ -613,6 +593,7 @@ public class RaidsPlugin extends Plugin
if (client.getVar(VarPlayer.IN_RAID_PARTY) == -1 && (!inRaidChambers || !config.scoutOverlayInRaid()))
{
overlay.setScoutOverlayShown(false);
+ raidStarted = false;
}
}
@@ -636,6 +617,25 @@ public class RaidsPlugin extends Plugin
.append(raidData)
.build())
.build());
+
+ if (overlay.recordRaid())
+ {
+ chatMessageManager.queue(QueuedMessage.builder()
+ .type(ChatMessageType.FRIENDSCHATNOTIFICATION)
+ .runeLiteFormattedMessage(new ChatMessageBuilder()
+ .append(ChatColorType.HIGHLIGHT)
+ .append("You have scouted a record raid, whilst this is a very good raid to do you will probably end up profiting more by selling this raid to a team looking for it.")
+ .build())
+ .build());
+
+ chatMessageManager.queue(QueuedMessage.builder()
+ .type(ChatMessageType.FRIENDSCHATNOTIFICATION)
+ .runeLiteFormattedMessage(new ChatMessageBuilder()
+ .append(ChatColorType.HIGHLIGHT)
+ .append("The following are some places you can sell this raid: Scout Trading in We do Raids discord, and Buying Cox Rotations in Oblivion discord.")
+ .build())
+ .build());
+ }
}
private void updateInfoBoxState()
@@ -1064,4 +1064,23 @@ public class RaidsPlugin extends Plugin
builder.append("Olm: ").append(secondsToTime(raidTime - lowerTime));
tooltip = builder.toString();
}
+
+ private final HotkeyListener hotkeyListener = new HotkeyListener(() -> config.hotkey())
+ {
+ @Override
+ public void hotkeyPressed()
+ {
+ if (config.scoutOverlayInRaid() && raidStarted)
+ {
+ if (overlay.isScoutOverlayShown())
+ {
+ overlay.setScoutOverlayShown(false);
+ }
+ else
+ {
+ overlay.setScoutOverlayShown(true);
+ }
+ }
+ }
+ };
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPointsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPointsOverlay.java
index 55888da06b..baedb561d7 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPointsOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPointsOverlay.java
@@ -44,14 +44,6 @@ import net.runelite.client.ui.overlay.components.table.TableComponent;
public class RaidsPointsOverlay extends Overlay
{
- @Inject
- private Client client;
-
- @Inject
- private RaidsPlugin plugin;
-
- private final PanelComponent panel = new PanelComponent();
-
private static final NumberFormat UNIQUE_FORMAT = NumberFormat.getPercentInstance(Locale.ENGLISH);
static
@@ -60,6 +52,12 @@ public class RaidsPointsOverlay extends Overlay
UNIQUE_FORMAT.setMinimumFractionDigits(2);
}
+ private final PanelComponent panel = new PanelComponent();
+ @Inject
+ private Client client;
+ @Inject
+ private RaidsPlugin plugin;
+
@Inject
private RaidsPointsOverlay(RaidsPlugin plugin)
{
@@ -96,17 +94,6 @@ public class RaidsPointsOverlay extends Overlay
}
tableComponent.addRow("Unique:", UNIQUE_FORMAT.format(uniqueChance));
- //TODO this is annoyingly bugged, personalpoints returns null for some reason
-/*
- if (partySize > 1)
- {
- double personalChance = uniqueChance * (double)(personalPoints / totalPoints);
-
- panel.getChildren().add(LineComponent.builder()
- .left("Personal:")
- .right(UNIQUE_FORMAT.format(personalChance))
- .build());
- }*/
panel.getChildren().add(tableComponent);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java
index 8df3087054..8e7dec1309 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsTimer.java
@@ -47,7 +47,7 @@ public class RaidsTimer extends InfoBox
@Setter
private boolean stopped;
- public RaidsTimer(BufferedImage image, Plugin plugin, Instant startTime)
+ RaidsTimer(BufferedImage image, Plugin plugin, Instant startTime)
{
super(image, plugin);
this.startTime = startTime;
@@ -55,7 +55,7 @@ public class RaidsTimer extends InfoBox
stopped = false;
}
- public void timeFloor()
+ void timeFloor()
{
Duration elapsed = Duration.between(floorTime, Instant.now());
@@ -75,45 +75,12 @@ public class RaidsTimer extends InfoBox
floorTime = Instant.now();
}
- public void timeOlm()
+ void timeOlm()
{
Duration elapsed = Duration.between(floorTime, Instant.now());
olmTime = LocalTime.ofSecondOfDay(elapsed.getSeconds());
}
- @Override
- public String getText()
- {
- if (startTime == null)
- {
- return "";
- }
-
- if (!stopped)
- {
- Duration elapsed = Duration.between(startTime, Instant.now());
- time = LocalTime.ofSecondOfDay(elapsed.getSeconds());
- }
-
- if (time.getHour() > 0)
- {
- return time.format(DateTimeFormatter.ofPattern("HH:mm"));
- }
-
- return time.format(DateTimeFormatter.ofPattern("mm:ss"));
- }
-
- @Override
- public Color getTextColor()
- {
- if (stopped)
- {
- return Color.GREEN;
- }
-
- return Color.WHITE;
- }
-
@Override
public String getTooltip()
{
@@ -147,4 +114,37 @@ public class RaidsTimer extends InfoBox
return builder.toString();
}
+
+ @Override
+ public String getText()
+ {
+ if (startTime == null)
+ {
+ return "";
+ }
+
+ if (!stopped)
+ {
+ Duration elapsed = Duration.between(startTime, Instant.now());
+ time = LocalTime.ofSecondOfDay(elapsed.getSeconds());
+ }
+
+ if (time.getHour() > 0)
+ {
+ return time.format(DateTimeFormatter.ofPattern("HH:mm"));
+ }
+
+ return time.format(DateTimeFormatter.ofPattern("mm:ss"));
+ }
+
+ @Override
+ public Color getTextColor()
+ {
+ if (stopped)
+ {
+ return Color.GREEN;
+ }
+
+ return Color.WHITE;
+ }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/shortcuts/ShortcutPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/shortcuts/ShortcutPlugin.java
index 59f6af301a..422c85225f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/shortcuts/ShortcutPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/shortcuts/ShortcutPlugin.java
@@ -26,17 +26,14 @@ import net.runelite.client.ui.overlay.OverlayManager;
@Slf4j
public class ShortcutPlugin extends Plugin
{
+ private final List shortcut = new ArrayList<>();
@Inject
private Client client;
-
@Inject
private OverlayManager overlayManager;
-
@Inject
private ShortcutOverlay overlay;
- private final List shortcut = new ArrayList<>();
-
List getShortcut()
{
return shortcut;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/Layout.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/Layout.java
index 3bee58d4fc..49944432a8 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/Layout.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/Layout.java
@@ -27,12 +27,17 @@ package net.runelite.client.plugins.raids.solver;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
+import lombok.Setter;
public class Layout
{
@Getter
private final List rooms = new ArrayList<>();
+ @Getter
+ @Setter
+ private String test;
+
public void add(Room room)
{
rooms.add(room);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/LayoutSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/LayoutSolver.java
index 3b893aee4e..c71a0ce946 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/LayoutSolver.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/LayoutSolver.java
@@ -213,6 +213,7 @@ public class LayoutSolver
room.setPrevious(lastRoom);
lastRoom.setNext(room);
layout.add(room);
+ layout.setTest(code);
position += 8;
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/RotationSolver.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/RotationSolver.java
index e7c9cd0c08..04e0323a5c 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/RotationSolver.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/solver/RotationSolver.java
@@ -32,25 +32,6 @@ import net.runelite.client.plugins.raids.RaidRoom.Boss;
public class RotationSolver
{
- private static class Rotation extends ArrayList
- {
- Rotation(Collection extends E> bosses)
- {
- super(bosses);
- }
-
- @Override
- public E get(int index)
- {
- if (index < 0)
- {
- index = index + size();
- }
-
- return super.get(index % size());
- }
- }
-
private static final Rotation[] ROTATIONS =
{
new Rotation<>(Arrays.asList(Boss.TEKTON, Boss.VASA, Boss.GUARDIANS, Boss.MYSTICS, Boss.SHAMANS, Boss.MUTTADILES, Boss.VANGUARDS, Boss.VESPULA)),
@@ -147,4 +128,23 @@ public class RotationSolver
return true;
}
+
+ private static class Rotation extends ArrayList
+ {
+ Rotation(Collection extends E> bosses)
+ {
+ super(bosses);
+ }
+
+ @Override
+ public E get(int index)
+ {
+ if (index < 0)
+ {
+ index = index + size();
+ }
+
+ return super.get(index % size());
+ }
+ }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java
index 257d2e470a..289940cb8f 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/runeliteplus/RuneLitePlusPlugin.java
@@ -27,8 +27,10 @@
package net.runelite.client.plugins.runeliteplus;
import com.google.inject.Provides;
+
import java.awt.event.KeyEvent;
import javax.inject.Inject;
+
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.Client;
import net.runelite.api.events.ConfigChanged;
@@ -48,11 +50,11 @@ import net.runelite.client.plugins.PluginType;
import net.runelite.client.ui.ClientUI;
@PluginDescriptor(
- loadWhenOutdated = true, // prevent users from disabling
- hidden = true, // prevent users from disabling
- name = "RuneLitePlus",
- description = "Configures various aspects of RuneLitePlus",
- type = PluginType.EXTERNAL
+ loadWhenOutdated = true, // prevent users from disabling
+ hidden = true, // prevent users from disabling
+ name = "RuneLitePlus",
+ description = "Configures various aspects of RuneLitePlus",
+ type = PluginType.EXTERNAL
)
@Slf4j
@@ -251,10 +253,13 @@ public class RuneLitePlusPlugin extends Plugin
private void handleKey(char c)
{
if (client.getWidget(WidgetID.BANK_PIN_GROUP_ID, 0) == null
- || !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Bank of Gielinor")
- && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Chambers of Xeric")
- && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Grand Exchange")
- && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Housing Security System"))
+ || !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Bank of Gielinor")
+ && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Chambers of Xeric")
+ && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Grand Exchange")
+ && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Housing Security System")
+ && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Dominic's Coffer")
+ && !client.getWidget(WidgetInfo.BANK_PIN_TOP_LEFT_TEXT).getText().equals("Dominic's Reward Shop"))
+
{
entered = 0;
enterIdx = 0;
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java
index 845dd15ac1..e15e641d33 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/SlayerPlugin.java
@@ -784,7 +784,7 @@ public class SlayerPlugin extends Plugin
private boolean doubleTroubleExtraKill()
{
return WorldPoint.fromLocalInstance(client, client.getLocalPlayer().getLocalLocation()).getRegionID() == GROTESQUE_GUARDIANS_REGION &&
- SlayerUnlock.GROTESQUE_GARDIAN_DOUBLE_COUNT.isEnabled(client);
+ SlayerUnlock.GROTESQUE_GUARDIAN_DOUBLE_COUNT.isEnabled(client);
}
// checks if any contiguous subsequence of seq0 exactly matches the String toMatch
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java
index d0e166492c..0c946c08d9 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java
@@ -126,13 +126,13 @@ public class TimersPlugin extends Plugin
private static final String CANNON_REPAIR_MESSAGE = "You repair your cannon, restoring it to working order.";
private static final String CHARGE_EXPIRED_MESSAGE = "
Your magical charge fades away.";
private static final String CHARGE_MESSAGE = "
You feel charged with magic power.";
- private static final String DEADMAN_HALF_TELEBLOCK_MESSAGE = "
A teleblock spell has been cast on you. It will expire in 1 minute, 15 seconds.";
+ private static final String DEADMAN_HALF_TELEBLOCK_MESSAGE = "
A Tele Block spell has been cast on you. It will expire in 1 minute, 15 seconds.";
private static final String EXTENDED_ANTIFIRE_DRINK_MESSAGE = "You drink some of your extended antifire potion.";
private static final String EXTENDED_SUPER_ANTIFIRE_DRINK_MESSAGE = "You drink some of your extended super antifire potion.";
private static final String FROZEN_MESSAGE = "
You have been frozen!";
- private static final String FULL_TELEBLOCK_MESSAGE = "
A teleblock spell has been cast on you. It will expire in 5 minutes, 0 seconds.";
+ private static final String FULL_TELEBLOCK_MESSAGE = "
A Tele Block spell has been cast on you. It will expire in 5 minutes, 0 seconds.";
private static final String GOD_WARS_ALTAR_MESSAGE = "you recharge your prayer.";
- private static final String HALF_TELEBLOCK_MESSAGE = "
A teleblock spell has been cast on you. It will expire in 2 minutes, 30 seconds.";
+ private static final String HALF_TELEBLOCK_MESSAGE = "
A Tele Block spell has been cast on you. It will expire in 2 minutes, 30 seconds.";
private static final String IMBUED_HEART_READY_MESSAGE = "
Your imbued heart has regained its magical power.";
private static final String IMBUED_HEART_NOTREADY_MESSAGE = "The heart is still drained of its power.";
private static final String MAGIC_IMBUE_EXPIRED_MESSAGE = "Your Magic Imbue charge has ended.";
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java
index 520dcb0f3b..973eec5eaa 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/OverviewItemPanel.java
@@ -35,6 +35,7 @@ import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
+import net.runelite.api.Constants;
import net.runelite.client.game.ItemManager;
import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.FontManager;
@@ -60,7 +61,7 @@ class OverviewItemPanel extends JPanel
setBorder(new EmptyBorder(7, 7, 7, 7));
JLabel iconLabel = new JLabel();
- iconLabel.setMinimumSize(new Dimension(36, 32));
+ iconLabel.setMinimumSize(new Dimension(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT));
itemManager.getImage(tab.getItemID()).addTo(iconLabel);
add(iconLabel, BorderLayout.WEST);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java
index 8bbb5ae4ab..c01f770063 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/TimeablePanel.java
@@ -33,6 +33,7 @@ import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import lombok.Getter;
+import net.runelite.api.Constants;
import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.components.ThinProgressBar;
@@ -58,7 +59,7 @@ public class TimeablePanel extends JPanel
topContainer.setLayout(new BorderLayout());
topContainer.setBackground(ColorScheme.DARKER_GRAY_COLOR);
- icon.setMinimumSize(new Dimension(36, 32));
+ icon.setMinimumSize(new Dimension(Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT));
JPanel infoPanel = new JPanel();
infoPanel.setBackground(ColorScheme.DARKER_GRAY_COLOR);
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/whalewatchers/WhaleWatchersOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/whalewatchers/WhaleWatchersOverlay.java
index 6158d791b6..5ea462699b 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/whalewatchers/WhaleWatchersOverlay.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/whalewatchers/WhaleWatchersOverlay.java
@@ -47,8 +47,8 @@ public class WhaleWatchersOverlay extends Overlay
this.plugin = plugin;
setLayer(OverlayLayer.ABOVE_WIDGETS);
setPriority(OverlayPriority.HIGHEST);
- setPosition(OverlayPosition.DYNAMIC);
- this.setPreferredPosition(OverlayPosition.TOP_CENTER);
+ setPosition(OverlayPosition.TOP_LEFT);
+ this.setPreferredPosition(OverlayPosition.TOP_LEFT);
panelComponent = new PanelComponent();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java
index b49a56a2a0..43f2f73a8a 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartLocation.java
@@ -27,151 +27,159 @@ package net.runelite.client.plugins.worldmap;
import lombok.Getter;
import net.runelite.api.coords.WorldPoint;
+import net.runelite.api.Quest;
+// Some quests are in the same spot, but they are done in order. If multiple
+// quests start in the same location, an array of quests is expected.
enum QuestStartLocation
{
//Free Quests
- COOKS_ASSISTANT_RFD("Cook's Assistant", new WorldPoint(3211, 3216, 0)),
- THE_CORSAIR_CURSE("The Corsair Curse", new WorldPoint(3029, 3273, 0)),
- DEMON_SLAYER("Demon Slayer", new WorldPoint(3204, 3424, 0)),
- DORICS_QUEST("Doric's Quest", new WorldPoint(2952, 3450, 0)),
- DRAGON_SLAYER("Dragon Slayer", new WorldPoint(3190, 3362, 0)),
- ERNEST_THE_CHICKEN("Ernest the Chicken", new WorldPoint(3109, 3330, 0)),
- GOBLIN_DIPLOMACY("Goblin Diplomacy", new WorldPoint(2957, 3509, 0)),
- IMP_CATCHER("Imp Catcher", new WorldPoint(3108, 3160, 0)),
- THE_KNIGHTS_SWORD("The Knight's Sword", new WorldPoint(2976, 3342, 0)),
- MISTHALIN_MYSTERY("Misthalin Mystery", new WorldPoint(3234, 3155, 0)),
- PIRATES_TREASURE("Pirate's Treasure", new WorldPoint(3051, 3252, 0)),
- PRINCE_ALI_RESCUE("Prince Ali Rescue", new WorldPoint(3301, 3163, 0)),
- THE_RESTLESS_GHOST("The Restless Ghost", new WorldPoint(3240, 3210, 0)),
- RUNE_MYSTERIES("Rune Mysteries", new WorldPoint(3210, 3220, 0)),
- SHEEP_SHEARER("Sheep Shearer", new WorldPoint(3190, 3272, 0)),
- SHIELD_OF_ARRAV_PHOENIX_GANG("Shield of Arrav (Phoenix Gang)", new WorldPoint(3208, 3495, 0)),
- SHIELD_OF_ARRAV_BLACK_ARM_GANG("Shield of Arrav (Black Arm Gang)", new WorldPoint(3208, 3392, 0)),
- VAMPIRE_SLAYER("Vampire Slayer", new WorldPoint(3096, 3266, 0)),
- WITCHS_POTION("Witch's Potion", new WorldPoint(2967, 3203, 0)),
- X_MARKS_THE_SPOT("X Marks the Spot", new WorldPoint(3227, 3242, 0)),
+ COOKS_ASSISTANT_RFD(Quest.COOKS_ASSISTANT, new WorldPoint(3211, 3216, 0)),
+ THE_CORSAIR_CURSE(Quest.THE_CORSAIR_CURSE, new WorldPoint(3029, 3273, 0)),
+ DEMON_SLAYER(Quest.DEMON_SLAYER, new WorldPoint(3204, 3424, 0)),
+ DORICS_QUEST(Quest.DORICS_QUEST, new WorldPoint(2952, 3450, 0)),
+ DRAGON_SLAYER(Quest.DRAGON_SLAYER, new WorldPoint(3190, 3362, 0)),
+ ERNEST_THE_CHICKEN(Quest.ERNEST_THE_CHICKEN, new WorldPoint(3109, 3330, 0)),
+ GOBLIN_DIPLOMACY(Quest.GOBLIN_DIPLOMACY, new WorldPoint(2957, 3509, 0)),
+ IMP_CATCHER(Quest.IMP_CATCHER, new WorldPoint(3108, 3160, 0)),
+ THE_KNIGHTS_SWORD(Quest.THE_KNIGHTS_SWORD, new WorldPoint(2976, 3342, 0)),
+ MISTHALIN_MYSTERY(Quest.MISTHALIN_MYSTERY, new WorldPoint(3234, 3155, 0)),
+ PIRATES_TREASURE(Quest.PIRATES_TREASURE, new WorldPoint(3051, 3252, 0)),
+ PRINCE_ALI_RESCUE(Quest.PRINCE_ALI_RESCUE, new WorldPoint(3301, 3163, 0)),
+ THE_RESTLESS_GHOST(Quest.THE_RESTLESS_GHOST, new WorldPoint(3240, 3210, 0)),
+ RUNE_MYSTERIES(Quest.RUNE_MYSTERIES, new WorldPoint(3210, 3220, 0)),
+ SHEEP_SHEARER(Quest.SHEEP_SHEARER, new WorldPoint(3190, 3272, 0)),
+ SHIELD_OF_ARRAV(Quest.SHIELD_OF_ARRAV, new WorldPoint(3208, 3495, 0)),
+ VAMPIRE_SLAYER(Quest.VAMPIRE_SLAYER, new WorldPoint(3096, 3266, 0)),
+ WITCHS_POTION(Quest.WITCHS_POTION, new WorldPoint(2967, 3203, 0)),
+ X_MARKS_THE_SPOT(Quest.X_MARKS_THE_SPOT, new WorldPoint(3227, 3242, 0)),
//Members' Quests
- ANIMAL_MAGNETISM("Animal Magnetism", new WorldPoint(3094, 3360, 0)),
- ANOTHER_SLICE_OF_HAM("Another Slice of H.A.M.", new WorldPoint(2799, 5428, 0)),
- THE_ASCENT_OF_ARCEUUS("The Ascent of Arceuus", new WorldPoint(1700, 3742, 0)),
- BETWEEN_A_ROCK("Between a Rock...", new WorldPoint(2823, 10168, 0)),
- BIG_CHOMPY_BIRD_HUNTING("Big Chompy Bird Hunting", new WorldPoint(2629, 2981, 0)),
- BIOHAZARD("Biohazard", new WorldPoint(2591, 3335, 0)),
- BONE_VOYAGE("Bone Voyage", new WorldPoint(3259, 3450, 0)),
- CABIN_FEVER("Cabin Fever", new WorldPoint(3674, 3496, 0)),
- CLIENT_OF_KOUREND("Client of Kourend", new WorldPoint(1823, 3690, 0)),
- CLOCK_TOWER("Clock Tower", new WorldPoint(2568, 3249, 0)),
- COLD_WAR("Cold War", new WorldPoint(2593, 3265, 0)),
- CONTACT("Contact!", new WorldPoint(3280, 2770, 0)),
- CREATURE_OF_FENKENSTRAIN("Creature of Fenkenstrain", new WorldPoint(3487, 3485, 0)),
- DARKNESS_OF_HALLOWVALE("Darkness of Hallowvale", new WorldPoint(3494, 9628, 0)),
- DEATH_PLATEAU_TROLL_STRONGHOLD("Death Plateau & Troll Stronghold", new WorldPoint(2895, 3528, 0)),
- DEATH_TO_THE_DORGESHUUN("Death to the Dorgeshuun", new WorldPoint(3316, 9613, 0)),
- THE_DEPTHS_OF_DESPAIR("The Depths of Despair", new WorldPoint(1846, 3556, 0)),
- DESERT_TREASURE("Desert Treasure", new WorldPoint(3177, 3043, 0)),
- DEVIOUS_MINDS("Devious Minds", new WorldPoint(3405, 3492, 0)),
- THE_DIG_SITE("The Dig Site", new WorldPoint(3363, 3337, 0)),
- DRAGON_SLAYER_II("Dragon Slayer II", new WorldPoint(2456, 2868, 0)),
- DREAM_MENTOR("Dream Mentor", new WorldPoint(2144, 10346, 0)),
- DRUIDIC_RITUAL("Druidic Ritual", new WorldPoint(2916, 3484, 0)),
- DWARF_CANNON("Dwarf Cannon", new WorldPoint(2566, 3461, 0)),
- EADGARS_RUSE("Eadgar's Ruse", new WorldPoint(2896, 3426, 0)),
- EAGLES_PEAK("Eagles' Peak", new WorldPoint(2605, 3264, 0)),
- ELEMENTAL_WORKSHOP("Elemental Workshop I & II", new WorldPoint(2714, 3482, 0)),
- ENAKHRAS_LAMENT("Enakhra's Lament", new WorldPoint(3190, 2926, 0)),
- ENLIGHTENED_JOURNEY("Enlightened Journey", new WorldPoint(2809, 3356, 0)),
- THE_EYES_OF_GLOUPHRIE("The Eyes of Glouphrie", new WorldPoint(2400, 3419, 0)),
- FAIRYTALE("Fairytale I & II", new WorldPoint(3077, 3258, 0)),
- FAMILY_CREST("Family Crest", new WorldPoint(3278, 3404, 0)),
- THE_FEUD("The Feud", new WorldPoint(3301, 3211, 0)),
- FIGHT_ARENA("Fight Arena", new WorldPoint(2565, 3199, 0)),
- FISHING_CONTEST_1("Fishing Contest", new WorldPoint(2875, 3483, 0)),
- FISHING_CONTEST_2("Fishing Contest", new WorldPoint(2820, 3487, 0)),
- FORGETTABLE_TALE("Forgettable Tale...", new WorldPoint(2826, 10215, 0)),
- THE_FORSAKEN_TOWER("The Forsaken Tower", new WorldPoint(1484, 3747, 0)),
- THE_FREMENNIK_ISLES("The Fremennik Isles", new WorldPoint(2645, 3711, 0)),
- THE_FREMENNIK_TRIALS("The Fremennik Trials", new WorldPoint(2657, 3669, 0)),
- GARDEN_OF_TRANQUILLITY("Garden of Tranquillity", new WorldPoint(3227, 3477, 0)),
- GERTRUDES_CAT_RATCATCHERS("Gertrude's Cat & Ratcatchers", new WorldPoint(3150, 3411, 0)),
- GHOSTS_AHOY("Ghosts Ahoy", new WorldPoint(3677, 3510, 0)),
- THE_GIANT_DWARF("The Giant Dwarf", new WorldPoint(2841, 10129, 0)),
- THE_GOLEM("The Golem", new WorldPoint(3487, 3089, 0)),
- THE_GRAND_TREE_MONKEY_MADNESS("The Grand Tree & Monkey Madness I & II", new WorldPoint(2466, 3497, 0)),
- THE_GREAT_BRAIN_ROBBERY("The Great Brain Robbery", new WorldPoint(3681, 2963, 0)),
- GRIM_TALES("Grim Tales", new WorldPoint(2890, 3454, 0)),
- THE_HAND_IN_THE_SAND("The Hand in the Sand", new WorldPoint(2552, 3101, 0)),
- HAUNTED_MINE("Haunted Mine", new WorldPoint(3443, 3258, 0)),
- HAZEEL_CULT("Hazeel Cult", new WorldPoint(2565, 3271, 0)),
- HEROES_QUEST("Heroes' Quest", new WorldPoint(2903, 3511, 0)),
- HOLY_GRAIL("Holy Grail & Merlin's Crystal", new WorldPoint(2763, 3515, 0)),
- HORROR_FROM_THE_DEEP("Horror from the Deep", new WorldPoint(2507, 3635, 0)),
- ICTHLARINS_LITTLE_HELPER("Icthlarin's Little Helper", new WorldPoint(3314, 2849, 0)),
- IN_SEARCH_OF_THE_MYREQUE("In Search of the Myreque", new WorldPoint(3502, 3477, 0)),
- JUNGLE_POTION("Jungle Potion", new WorldPoint(2809, 3086, 0)),
- KINGS_RANSOM("King's Ransom", new WorldPoint(2741, 3554, 0)),
- LEGENDS_QUEST("Legends' Quest", new WorldPoint(2725, 3367, 0)),
- LOST_CITY("Lost City", new WorldPoint(3149, 3205, 0)),
- THE_LOST_TRIBE("The Lost Tribe", new WorldPoint(3211, 3224, 0)),
- LUNAR_DIPLOMACY("Lunar Diplomacy", new WorldPoint(2619, 3689, 0)),
- MAKING_FRIENDS_WITH_MY_ARM("Making Friends with My Arm", new WorldPoint(2904, 10092, 0)),
- MAKING_HISTORY("Making History", new WorldPoint(2435, 3346, 0)),
- MONKS_FRIEND("Monk's Friend", new WorldPoint(2605, 3209, 0)),
- MOUNTAIN_DAUGHTER("Mountain Daughter", new WorldPoint(2810, 3672, 0)),
- MOURNINGS_ENDS_PART_I("Mourning's Ends Part I", new WorldPoint(2289, 3149, 0)),
- MOURNINGS_ENDS_PART_II("Mourning's Ends Part II", new WorldPoint(2352, 3172, 0)),
- MURDER_MYSTERY("Murder Mystery", new WorldPoint(2740, 3562, 0)),
- MY_ARMS_BIG_ADVENTURE("My Arm's Big Adventure", new WorldPoint(2908, 10088, 0)),
- NATURE_SPIRIT("Nature Spirit", new WorldPoint(3440, 9894, 0)),
- OBSERVATORY_QUEST("Observatory Quest", new WorldPoint(2438, 3185, 0)),
- OLAFS_QUEST("Olaf's Quest", new WorldPoint(2723, 3729, 0)),
- ONE_SMALL_FAVOUR("One Small Favour", new WorldPoint(2834, 2985, 0)),
- PLAGUE_CITY("Plague City", new WorldPoint(2567, 3334, 0)),
- PRIEST_IN_PERIL("Priest in Peril", new WorldPoint(3219, 3473, 0)),
- THE_QUEEN_OF_THIEVES("The Queen of Thieves", new WorldPoint(1795, 3782, 0)),
- RAG_AND_BONE_MAN("Rag and Bone Man I & II", new WorldPoint(3359, 3504, 0)),
- RECRUITMENT_DRIVE_BLACK_KNIGHTS_FORTRESS("Recruitment Drive & Black Knights' Fortress", new WorldPoint(2959, 3336, 0)),
- ROVING_ELVES("Roving Elves", new WorldPoint(2289, 3146, 0)),
- RUM_DEAL("Rum Deal", new WorldPoint(3679, 3535, 0)),
- SCORPION_CATCHER("Scorpion Catcher", new WorldPoint(2701, 3399, 0)),
- SEA_SLUG("Sea Slug", new WorldPoint(2715, 3302, 0)),
- SHADES_OF_MORTTON("Shades of Mort'ton", new WorldPoint(3463, 3308, 0)),
- SHADOW_OF_THE_STORM("Shadow of the Storm", new WorldPoint(3270, 3159, 0)),
- SHEEP_HERDER("Sheep Herder", new WorldPoint(2616, 3299, 0)),
- SHILO_VILLAGE("Shilo Village", new WorldPoint(2882, 2951, 0)),
- A_SOULS_BANE("A Soul's Bane", new WorldPoint(3307, 3454, 0)),
- SPIRITS_OF_THE_ELID("Spirits of the Elid", new WorldPoint(3441, 2911, 0)),
- SWAN_SONG("Swan Song", new WorldPoint(2345, 3652, 0)),
- TAI_BWO_WANNAI_TRIO("Tai Bwo Wannai Trio", new WorldPoint(2779, 3087, 0)),
- A_TAIL_OF_TWO_CATS("A Tail of Two Cats", new WorldPoint(2917, 3557, 0)),
- TALE_OF_THE_RIGHTEOUS("Tale of the Righteous", new WorldPoint(1511, 3631, 0)),
- A_TASTE_OF_HOPE("A Taste of Hope", new WorldPoint(3668, 3216, 0)),
- TEARS_OF_GUTHIX("Tears of Guthix", new WorldPoint(3251, 9517, 0)),
- TEMPLE_OF_IKOV("Temple of Ikov", new WorldPoint(2574, 3320, 0)),
- THRONE_OF_MISCELLANIA_ROYAL_TROUBLE("Throne of Miscellania & Royal Trouble", new WorldPoint(2497, 3859, 0)),
- THE_TOURIST_TRAP("The Tourist Trap", new WorldPoint(3302, 3113, 0)),
- TOWER_OF_LIFE("Tower of Life", new WorldPoint(2640, 3218, 0)),
- TREE_GNOME_VILLAGE("Tree Gnome Village", new WorldPoint(2541, 3169, 0)),
- TRIBAL_TOTEM("Tribal Totem", new WorldPoint(2790, 3182, 0)),
- TROLL_ROMANCE("Troll Romance", new WorldPoint(2890, 10097, 0)),
- UNDERGROUND_PASS_REGICIDE("Underground Pass & Regicide", new WorldPoint(2575, 3293, 0)),
- WANTED_SLUG_MENACE("Wanted! & The Slug Menace", new WorldPoint(2996, 3373, 0)),
- WATCHTOWER("Watchtower", new WorldPoint(2545, 3112, 0)),
- WATERFALL_QUEST("Waterfall Quest", new WorldPoint(2521, 3498, 0)),
- WHAT_LIES_BELOW("What Lies Below", new WorldPoint(3265, 3333, 0)),
- WITCHS_HOUSE("Witch's House", new WorldPoint(2927, 3456, 0)),
- ZOGRE_FLESH_EATERS("Zogre Flesh Eaters", new WorldPoint(2442, 3051, 0));
-
- @Getter
- private final String tooltip;
+ ANIMAL_MAGNETISM(Quest.ANIMAL_MAGNETISM, new WorldPoint(3094, 3360, 0)),
+ ANOTHER_SLICE_OF_HAM(Quest.ANOTHER_SLICE_OF_HAM, new WorldPoint(2799, 5428, 0)),
+ THE_ASCENT_OF_ARCEUUS(Quest.THE_ASCENT_OF_ARCEUUS, new WorldPoint(1700, 3742, 0)),
+ BETWEEN_A_ROCK(Quest.BETWEEN_A_ROCK, new WorldPoint(2823, 10168, 0)),
+ BIG_CHOMPY_BIRD_HUNTING(Quest.BIG_CHOMPY_BIRD_HUNTING, new WorldPoint(2629, 2981, 0)),
+ BIOHAZARD(Quest.BIOHAZARD, new WorldPoint(2591, 3335, 0)),
+ BONE_VOYAGE(Quest.BONE_VOYAGE, new WorldPoint(3259, 3450, 0)),
+ CABIN_FEVER(Quest.CABIN_FEVER, new WorldPoint(3674, 3496, 0)),
+ CLIENT_OF_KOUREND(Quest.CLIENT_OF_KOUREND, new WorldPoint(1823, 3690, 0)),
+ CLOCK_TOWER(Quest.CLOCK_TOWER, new WorldPoint(2568, 3249, 0)),
+ COLD_WAR(Quest.COLD_WAR, new WorldPoint(2593, 3265, 0)),
+ CONTACT(Quest.CONTACT, new WorldPoint(3280, 2770, 0)),
+ CREATURE_OF_FENKENSTRAIN(Quest.CREATURE_OF_FENKENSTRAIN, new WorldPoint(3487, 3485, 0)),
+ DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3494, 9628, 0)),
+ DEATH_PLATEAU_TROLL_STRONGHOLD(new Quest[]{Quest.DEATH_PLATEAU, Quest.TROLL_STRONGHOLD}, new WorldPoint(2895, 3528, 0)),
+ DEATH_TO_THE_DORGESHUUN(Quest.DEATH_TO_THE_DORGESHUUN, new WorldPoint(3316, 9613, 0)),
+ THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1846, 3556, 0)),
+ DESERT_TREASURE(Quest.DESERT_TREASURE, new WorldPoint(3177, 3043, 0)),
+ DEVIOUS_MINDS(Quest.DEVIOUS_MINDS, new WorldPoint(3405, 3492, 0)),
+ THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3337, 0)),
+ DRAGON_SLAYER_II(Quest.DRAGON_SLAYER_II, new WorldPoint(2456, 2868, 0)),
+ DREAM_MENTOR(Quest.DREAM_MENTOR, new WorldPoint(2144, 10346, 0)),
+ DRUIDIC_RITUAL(Quest.DRUIDIC_RITUAL, new WorldPoint(2916, 3484, 0)),
+ DWARF_CANNON(Quest.DWARF_CANNON, new WorldPoint(2566, 3461, 0)),
+ EADGARS_RUSE(Quest.EADGARS_RUSE, new WorldPoint(2896, 3426, 0)),
+ EAGLES_PEAK(Quest.EAGLES_PEAK, new WorldPoint(2605, 3264, 0)),
+ ELEMENTAL_WORKSHOP(new Quest[]{Quest.ELEMENTAL_WORKSHOP_I, Quest.ELEMENTAL_WORKSHOP_II}, new WorldPoint(2714, 3482, 0)),
+ ENAKHRAS_LAMENT(Quest.ENAKHRAS_LAMENT, new WorldPoint(3190, 2926, 0)),
+ ENLIGHTENED_JOURNEY(Quest.ENLIGHTENED_JOURNEY, new WorldPoint(2809, 3356, 0)),
+ THE_EYES_OF_GLOUPHRIE(Quest.THE_EYES_OF_GLOUPHRIE, new WorldPoint(2400, 3419, 0)),
+ FAIRYTALE(new Quest[]{Quest.FAIRYTALE_I__GROWING_PAINS, Quest.FAIRYTALE_II__CURE_A_QUEEN}, new WorldPoint(3077, 3258, 0)),
+ FAMILY_CREST(Quest.FAMILY_CREST, new WorldPoint(3278, 3404, 0)),
+ THE_FEUD(Quest.THE_FEUD, new WorldPoint(3301, 3211, 0)),
+ FIGHT_ARENA(Quest.FIGHT_ARENA, new WorldPoint(2565, 3199, 0)),
+ FISHING_CONTEST_1(Quest.FISHING_CONTEST, new WorldPoint(2875, 3483, 0)),
+ FISHING_CONTEST_2(Quest.FISHING_CONTEST, new WorldPoint(2820, 3487, 0)),
+ FORGETTABLE_TALE(Quest.FORGETTABLE_TALE, new WorldPoint(2826, 10215, 0)),
+ THE_FORSAKEN_TOWER(Quest.THE_FORSAKEN_TOWER, new WorldPoint(1484, 3747, 0)),
+ THE_FREMENNIK_ISLES(Quest.THE_FREMENNIK_ISLES, new WorldPoint(2645, 3711, 0)),
+ THE_FREMENNIK_TRIALS(Quest.THE_FREMENNIK_TRIALS, new WorldPoint(2657, 3669, 0)),
+ GARDEN_OF_TRANQUILLITY(Quest.GARDEN_OF_TRANQUILLITY, new WorldPoint(3227, 3477, 0)),
+ GERTRUDES_CAT_RATCATCHERS(Quest.GERTRUDES_CAT, new WorldPoint(3150, 3411, 0)),
+ GHOSTS_AHOY(Quest.GHOSTS_AHOY, new WorldPoint(3677, 3510, 0)),
+ THE_GIANT_DWARF(Quest.THE_GIANT_DWARF, new WorldPoint(2841, 10129, 0)),
+ THE_GOLEM(Quest.THE_GOLEM, new WorldPoint(3487, 3089, 0)),
+ THE_GRAND_TREE_MONKEY_MADNESS(new Quest[]{Quest.THE_GRAND_TREE, Quest.MONKEY_MADNESS_I, Quest.MONKEY_MADNESS_II}, new WorldPoint(2466, 3497, 0)),
+ THE_GREAT_BRAIN_ROBBERY(Quest.THE_GREAT_BRAIN_ROBBERY, new WorldPoint(3681, 2963, 0)),
+ GRIM_TALES(Quest.GRIM_TALES, new WorldPoint(2890, 3454, 0)),
+ THE_HAND_IN_THE_SAND(Quest.THE_HAND_IN_THE_SAND, new WorldPoint(2552, 3101, 0)),
+ HAUNTED_MINE(Quest.HAUNTED_MINE, new WorldPoint(3443, 3258, 0)),
+ HAZEEL_CULT(Quest.HAZEEL_CULT, new WorldPoint(2565, 3271, 0)),
+ HEROES_QUEST(Quest.HEROES_QUEST, new WorldPoint(2903, 3511, 0)),
+ HOLY_GRAIL(new Quest[]{Quest.MERLINS_CRYSTAL, Quest.HOLY_GRAIL}, new WorldPoint(2763, 3515, 0)),
+ HORROR_FROM_THE_DEEP(Quest.HORROR_FROM_THE_DEEP, new WorldPoint(2507, 3635, 0)),
+ ICTHLARINS_LITTLE_HELPER(Quest.ICTHLARINS_LITTLE_HELPER, new WorldPoint(3314, 2849, 0)),
+ IN_SEARCH_OF_THE_MYREQUE(Quest.IN_SEARCH_OF_THE_MYREQUE, new WorldPoint(3502, 3477, 0)),
+ JUNGLE_POTION(Quest.JUNGLE_POTION, new WorldPoint(2809, 3086, 0)),
+ KINGS_RANSOM(Quest.KINGS_RANSOM, new WorldPoint(2741, 3554, 0)),
+ LEGENDS_QUEST(Quest.LEGENDS_QUEST, new WorldPoint(2725, 3367, 0)),
+ LOST_CITY(Quest.LOST_CITY, new WorldPoint(3149, 3205, 0)),
+ THE_LOST_TRIBE(Quest.THE_LOST_TRIBE, new WorldPoint(3211, 3224, 0)),
+ LUNAR_DIPLOMACY(Quest.LUNAR_DIPLOMACY, new WorldPoint(2619, 3689, 0)),
+ MAKING_FRIENDS_WITH_MY_ARM(Quest.MAKING_FRIENDS_WITH_MY_ARM, new WorldPoint(2904, 10092, 0)),
+ MAKING_HISTORY(Quest.MAKING_HISTORY, new WorldPoint(2435, 3346, 0)),
+ MONKS_FRIEND(Quest.MONKS_FRIEND, new WorldPoint(2605, 3209, 0)),
+ MOUNTAIN_DAUGHTER(Quest.MOUNTAIN_DAUGHTER, new WorldPoint(2810, 3672, 0)),
+ MOURNINGS_ENDS_PART_I(Quest.MOURNINGS_ENDS_PART_I, new WorldPoint(2289, 3149, 0)),
+ MOURNINGS_ENDS_PART_II(Quest.MOURNINGS_ENDS_PART_II, new WorldPoint(2352, 3172, 0)),
+ MURDER_MYSTERY(Quest.MURDER_MYSTERY, new WorldPoint(2740, 3562, 0)),
+ MY_ARMS_BIG_ADVENTURE(Quest.MY_ARMS_BIG_ADVENTURE, new WorldPoint(2908, 10088, 0)),
+ NATURE_SPIRIT(Quest.NATURE_SPIRIT, new WorldPoint(3440, 9894, 0)),
+ OBSERVATORY_QUEST(Quest.OBSERVATORY_QUEST, new WorldPoint(2438, 3185, 0)),
+ OLAFS_QUEST(Quest.OLAFS_QUEST, new WorldPoint(2723, 3729, 0)),
+ ONE_SMALL_FAVOUR(Quest.ONE_SMALL_FAVOUR, new WorldPoint(2834, 2985, 0)),
+ PLAGUE_CITY(Quest.PLAGUE_CITY, new WorldPoint(2567, 3334, 0)),
+ PRIEST_IN_PERIL(Quest.PRIEST_IN_PERIL, new WorldPoint(3219, 3473, 0)),
+ THE_QUEEN_OF_THIEVES(Quest.THE_QUEEN_OF_THIEVES, new WorldPoint(1795, 3782, 0)),
+ RAG_AND_BONE_MAN(new Quest[]{Quest.RAG_AND_BONE_MAN, Quest.RAG_AND_BONE_MAN_II}, new WorldPoint(3359, 3504, 0)),
+ RECRUITMENT_DRIVE_BLACK_KNIGHTS_FORTRESS(new Quest[]{Quest.BLACK_KNIGHTS_FORTRESS, Quest.RECRUITMENT_DRIVE}, new WorldPoint(2959, 3336, 0)),
+ ROVING_ELVES(Quest.ROVING_ELVES, new WorldPoint(2289, 3146, 0)),
+ RUM_DEAL(Quest.RUM_DEAL, new WorldPoint(3679, 3535, 0)),
+ SCORPION_CATCHER(Quest.SCORPION_CATCHER, new WorldPoint(2701, 3399, 0)),
+ SEA_SLUG(Quest.SEA_SLUG, new WorldPoint(2715, 3302, 0)),
+ SHADES_OF_MORTTON(Quest.SHADES_OF_MORTTON, new WorldPoint(3463, 3308, 0)),
+ SHADOW_OF_THE_STORM(Quest.SHADOW_OF_THE_STORM, new WorldPoint(3270, 3159, 0)),
+ SHEEP_HERDER(Quest.SHEEP_HERDER, new WorldPoint(2616, 3299, 0)),
+ SHILO_VILLAGE(Quest.SHILO_VILLAGE, new WorldPoint(2882, 2951, 0)),
+ A_SOULS_BANE(Quest.A_SOULS_BANE, new WorldPoint(3307, 3454, 0)),
+ SPIRITS_OF_THE_ELID(Quest.SPIRITS_OF_THE_ELID, new WorldPoint(3441, 2911, 0)),
+ SWAN_SONG(Quest.SWAN_SONG, new WorldPoint(2345, 3652, 0)),
+ TAI_BWO_WANNAI_TRIO(Quest.TAI_BWO_WANNAI_TRIO, new WorldPoint(2779, 3087, 0)),
+ A_TAIL_OF_TWO_CATS(Quest.A_TAIL_OF_TWO_CATS, new WorldPoint(2917, 3557, 0)),
+ TALE_OF_THE_RIGHTEOUS(Quest.TALE_OF_THE_RIGHTEOUS, new WorldPoint(1511, 3631, 0)),
+ A_TASTE_OF_HOPE(Quest.A_TASTE_OF_HOPE, new WorldPoint(3668, 3216, 0)),
+ TEARS_OF_GUTHIX(Quest.TEARS_OF_GUTHIX, new WorldPoint(3251, 9517, 0)),
+ TEMPLE_OF_IKOV(Quest.TEMPLE_OF_IKOV, new WorldPoint(2574, 3320, 0)),
+ THRONE_OF_MISCELLANIA_ROYAL_TROUBLE(new Quest[]{Quest.THRONE_OF_MISCELLANIA, Quest.ROYAL_TROUBLE}, new WorldPoint(2497, 3859, 0)),
+ THE_TOURIST_TRAP(Quest.THE_TOURIST_TRAP, new WorldPoint(3302, 3113, 0)),
+ TOWER_OF_LIFE(Quest.TOWER_OF_LIFE, new WorldPoint(2640, 3218, 0)),
+ TREE_GNOME_VILLAGE(Quest.TREE_GNOME_VILLAGE, new WorldPoint(2541, 3169, 0)),
+ TRIBAL_TOTEM(Quest.TRIBAL_TOTEM, new WorldPoint(2790, 3182, 0)),
+ TROLL_ROMANCE(Quest.TROLL_ROMANCE, new WorldPoint(2890, 10097, 0)),
+ UNDERGROUND_PASS_REGICIDE(new Quest[]{Quest.REGICIDE, Quest.UNDERGROUND_PASS}, new WorldPoint(2575, 3293, 0)),
+ WANTED_SLUG_MENACE(new Quest[]{Quest.WANTED, Quest.THE_SLUG_MENACE}, new WorldPoint(2996, 3373, 0)),
+ WATCHTOWER(Quest.WATCHTOWER, new WorldPoint(2545, 3112, 0)),
+ WATERFALL_QUEST(Quest.WATERFALL_QUEST, new WorldPoint(2521, 3498, 0)),
+ WHAT_LIES_BELOW(Quest.WHAT_LIES_BELOW, new WorldPoint(3265, 3333, 0)),
+ WITCHS_HOUSE(Quest.WITCHS_HOUSE, new WorldPoint(2927, 3456, 0)),
+ ZOGRE_FLESH_EATERS(Quest.ZOGRE_FLESH_EATERS, new WorldPoint(2442, 3051, 0));
@Getter
private final WorldPoint location;
- QuestStartLocation(String description, WorldPoint location)
+ @Getter
+ private final Quest[] quests;
+
+ QuestStartLocation(Quest[] quests, WorldPoint location)
{
- this.tooltip = "Quest Start - " + description;
this.location = location;
+ this.quests = quests;
+ }
+
+ QuestStartLocation(Quest quest, WorldPoint location)
+ {
+ this.location = location;
+ this.quests = new Quest[]{quest};
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java
index ad84a3aa5b..4bd778188c 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/QuestStartPoint.java
@@ -25,15 +25,15 @@
*/
package net.runelite.client.plugins.worldmap;
+import net.runelite.api.coords.WorldPoint;
import java.awt.image.BufferedImage;
import net.runelite.client.ui.overlay.worldmap.WorldMapPoint;
class QuestStartPoint extends WorldMapPoint
{
- QuestStartPoint(QuestStartLocation data, BufferedImage icon)
+ QuestStartPoint(WorldPoint location, BufferedImage icon, String tooltip)
{
- super(data.getLocation(), icon);
-
- setTooltip(data.getTooltip());
+ super(location, icon);
+ setTooltip(tooltip);
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java
index ca62df484d..7ebe417ef2 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapConfig.java
@@ -166,8 +166,8 @@ public interface WorldMapConfig extends Config
@ConfigItem(
keyName = WorldMapPlugin.CONFIG_KEY_QUEST_START_TOOLTIPS,
- name = "Show quest names",
- description = "Indicates the names of quests and highlights incomplete ones",
+ name = "Show quest names and status",
+ description = "Indicates the names of quests and shows completion status",
position = 13
)
default boolean questStartTooltips()
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java
index f936fd4bf1..d5be4c8591 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java
@@ -31,9 +31,15 @@ import java.awt.image.BufferedImage;
import java.util.Arrays;
import net.runelite.api.Client;
import net.runelite.api.Experience;
+import net.runelite.api.GameState;
import net.runelite.api.Skill;
+import net.runelite.api.Quest;
+import net.runelite.api.QuestState;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.ExperienceChanged;
+import net.runelite.api.events.WidgetLoaded;
+import net.runelite.api.widgets.WidgetID;
+import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.game.AgilityShortcut;
@@ -52,6 +58,9 @@ public class WorldMapPlugin extends Plugin
static final BufferedImage BLANK_ICON;
private static final BufferedImage FAIRY_TRAVEL_ICON;
private static final BufferedImage NOPE_ICON;
+ private static final BufferedImage NOT_STARTED_ICON;
+ private static final BufferedImage STARTED_ICON;
+ private static final BufferedImage FINISHED_ICON;
static final String CONFIG_KEY = "worldmap";
static final String CONFIG_KEY_FAIRY_RING_TOOLTIPS = "fairyRingTooltips";
@@ -77,6 +86,9 @@ public class WorldMapPlugin extends Plugin
//A size of 17 gives us a buffer when triggering tooltips
final int iconBufferSize = 17;
+ //Quest icons are a bit bigger.
+ final int questIconBufferSize = 22;
+
BLANK_ICON = new BufferedImage(iconBufferSize, iconBufferSize, BufferedImage.TYPE_INT_ARGB);
FAIRY_TRAVEL_ICON = new BufferedImage(iconBufferSize, iconBufferSize, BufferedImage.TYPE_INT_ARGB);
@@ -86,11 +98,26 @@ public class WorldMapPlugin extends Plugin
NOPE_ICON = new BufferedImage(iconBufferSize, iconBufferSize, BufferedImage.TYPE_INT_ARGB);
final BufferedImage nopeImage = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "nope_icon.png");
NOPE_ICON.getGraphics().drawImage(nopeImage, 1, 1, null);
+
+ NOT_STARTED_ICON = new BufferedImage(questIconBufferSize, questIconBufferSize, BufferedImage.TYPE_INT_ARGB);
+ final BufferedImage notStartedIcon = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "quest_not_started_icon.png");
+ NOT_STARTED_ICON.getGraphics().drawImage(notStartedIcon, 4, 4, null);
+
+ STARTED_ICON = new BufferedImage(questIconBufferSize, questIconBufferSize, BufferedImage.TYPE_INT_ARGB);
+ final BufferedImage startedIcon = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "quest_started_icon.png");
+ STARTED_ICON.getGraphics().drawImage(startedIcon, 4, 4, null);
+
+ FINISHED_ICON = new BufferedImage(questIconBufferSize, questIconBufferSize, BufferedImage.TYPE_INT_ARGB);
+ final BufferedImage finishedIcon = ImageUtil.getResourceStreamFromClass(WorldMapPlugin.class, "quest_completed_icon.png");
+ FINISHED_ICON.getGraphics().drawImage(finishedIcon, 4, 4, null);
}
@Inject
private Client client;
+ @Inject
+ private ClientThread clientThread;
+
@Inject
private WorldMapConfig config;
@@ -164,6 +191,17 @@ public class WorldMapPlugin extends Plugin
}
}
+ @Subscribe
+ public void onWidgetLoaded(WidgetLoaded widgetLoaded)
+ {
+ if (widgetLoaded.getGroupId() == WidgetID.WORLD_MAP_GROUP_ID)
+ {
+ // Quest icons are per-account due to showing quest status,
+ // so we recreate them each time the map is loaded
+ updateQuestStartPointIcons();
+ }
+ }
+
private void updateAgilityIcons()
{
worldMapPointManager.removeIf(AgilityShortcutPoint.class::isInstance);
@@ -200,6 +238,7 @@ public class WorldMapPlugin extends Plugin
{
updateAgilityIcons();
updateRareTreeIcons();
+ updateQuestStartPointIcons();
worldMapPointManager.removeIf(FairyRingPoint.class::isInstance);
if (config.fairyRingIcon() || config.fairyRingTooltips())
@@ -219,14 +258,6 @@ public class WorldMapPlugin extends Plugin
.forEach(worldMapPointManager::add);
}
- worldMapPointManager.removeIf(QuestStartPoint.class::isInstance);
- if (config.questStartTooltips())
- {
- Arrays.stream(QuestStartLocation.values())
- .map(value -> new QuestStartPoint(value, BLANK_ICON))
- .forEach(worldMapPointManager::add);
- }
-
worldMapPointManager.removeIf(TransportationPoint.class::isInstance);
if (config.transportationTeleportTooltips())
{
@@ -271,4 +302,72 @@ public class WorldMapPlugin extends Plugin
}).map(TeleportPoint::new)
.forEach(worldMapPointManager::add);
}
+
+ private void updateQuestStartPointIcons()
+ {
+ worldMapPointManager.removeIf(QuestStartPoint.class::isInstance);
+
+ if (!config.questStartTooltips())
+ {
+ return;
+ }
+
+ // Must setup the quest icons on the client thread, after the player has logged in.
+ clientThread.invokeLater(() ->
+ {
+ if (client.getGameState() != GameState.LOGGED_IN)
+ {
+ return false;
+ }
+
+ Arrays.stream(QuestStartLocation.values())
+ .map(this::createQuestStartPoint)
+ .forEach(worldMapPointManager::add);
+ return true;
+ });
+ }
+
+ private QuestStartPoint createQuestStartPoint(QuestStartLocation data)
+ {
+ Quest[] quests = data.getQuests();
+
+ // Get first uncompleted quest. Else, return the last quest.
+ Quest quest = null;
+ for (int i = 0; i < quests.length; i++)
+ {
+ if (quests[i].getState(client) != QuestState.FINISHED)
+ {
+ quest = quests[i];
+ break;
+ }
+ }
+ if (quest == null)
+ {
+ quest = quests[quests.length - 1];
+ }
+
+ BufferedImage icon = BLANK_ICON;
+ String tooltip = "";
+ if (quest != null)
+ {
+ tooltip = quest.getName();
+ switch (quest.getState(client))
+ {
+ case FINISHED:
+ icon = FINISHED_ICON;
+ tooltip += " - Finished";
+ break;
+ case IN_PROGRESS:
+ icon = STARTED_ICON;
+ tooltip += " - Started";
+ break;
+ case NOT_STARTED:
+ icon = NOT_STARTED_ICON;
+ tooltip += " - Not Started";
+ break;
+ }
+ }
+
+ return new QuestStartPoint(data.getLocation(), icon, tooltip);
+ }
}
diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java
index b2e57c6cd1..366d636e94 100644
--- a/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java
+++ b/runelite-client/src/main/java/net/runelite/client/plugins/zulrah/ZulrahPlugin.java
@@ -2,6 +2,7 @@
* Copyright (c) 2017, Aria
* Copyright (c) 2017, Adam
* Copyright (c) 2017, Devin French
+ * Copyright (c) 2019, Ganom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,9 +31,13 @@ import com.google.inject.Provides;
import javax.inject.Inject;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
+import net.runelite.api.Actor;
+import net.runelite.api.AnimationID;
import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.NPC;
+import net.runelite.api.Prayer;
+import net.runelite.api.events.AnimationChanged;
import net.runelite.api.events.GameTick;
import net.runelite.api.events.NpcDespawned;
import net.runelite.api.events.NpcSpawned;
@@ -53,7 +58,6 @@ import net.runelite.client.plugins.zulrah.patterns.ZulrahPatternB;
import net.runelite.client.plugins.zulrah.patterns.ZulrahPatternC;
import net.runelite.client.plugins.zulrah.patterns.ZulrahPatternD;
import net.runelite.client.plugins.zulrah.phase.ZulrahPhase;
-import net.runelite.client.plugins.zulrah.phase.ZulrahType;
import net.runelite.client.ui.overlay.OverlayManager;
@PluginDescriptor(
@@ -66,32 +70,32 @@ import net.runelite.client.ui.overlay.OverlayManager;
@Slf4j
public class ZulrahPlugin extends Plugin
{
+ private static final ZulrahPattern[] patterns = new ZulrahPattern[]
+ {
+ new ZulrahPatternA(),
+ new ZulrahPatternB(),
+ new ZulrahPatternC(),
+ new ZulrahPatternD()
+ };
@Getter
private NPC zulrah;
-
@Inject
private Client client;
-
@Inject
private ZulrahConfig config;
-
@Inject
private OverlayManager overlayManager;
-
@Inject
private SoundManager soundManager;
-
@Inject
private ZulrahCurrentPhaseOverlay currentPhaseOverlay;
-
@Inject
private ZulrahNextPhaseOverlay nextPhaseOverlay;
-
@Inject
private ZulrahPrayerOverlay zulrahPrayerOverlay;
-
@Inject
private ZulrahOverlay zulrahOverlay;
+ private ZulrahInstance instance;
@Provides
ZulrahConfig getConfig(ConfigManager configManager)
@@ -99,16 +103,6 @@ public class ZulrahPlugin extends Plugin
return configManager.getConfig(ZulrahConfig.class);
}
- private static final ZulrahPattern[] patterns = new ZulrahPattern[]
- {
- new ZulrahPatternA(),
- new ZulrahPatternB(),
- new ZulrahPatternC(),
- new ZulrahPatternD()
- };
-
- private ZulrahInstance instance;
-
@Override
protected void startUp() throws Exception
{
@@ -168,22 +162,8 @@ public class ZulrahPlugin extends Plugin
log.debug("Zulrah phase has moved from {} -> {}, stage: {}", previousPhase, currentPhase, instance.getStage());
}
- ZulrahType type = instance.getPhase().getType();
-
- if (config.sounds())
- {
- if (type == ZulrahType.RANGE)
- {
- soundManager.playSound(Sound.PRAY_RANGED);
- }
-
- if (type == ZulrahType.MAGIC)
- {
- soundManager.playSound(Sound.PRAY_MAGIC);
- }
- }
-
ZulrahPattern pattern = instance.getPattern();
+
if (pattern == null)
{
int potential = 0;
@@ -213,6 +193,47 @@ public class ZulrahPlugin extends Plugin
}
}
+ @Subscribe
+ public void onAnimationChanged(AnimationChanged event)
+ {
+ if (instance == null)
+ {
+ return;
+ }
+
+ ZulrahPhase currentPhase = instance.getPhase();
+
+ if (currentPhase == null)
+ {
+ return;
+ }
+
+ Actor actor = event.getActor();
+ if (config.sounds())
+ {
+ if (zulrah == actor)
+ {
+ if (zulrah.getAnimation() == AnimationID.ZULRAH_PHASE)
+ {
+ Prayer prayer = instance.getNextPhase().getPrayer();
+
+ if (prayer != null)
+ {
+ switch (prayer)
+ {
+ case PROTECT_FROM_MAGIC:
+ soundManager.playSound(Sound.PRAY_MAGIC);
+ break;
+ case PROTECT_FROM_MISSILES:
+ soundManager.playSound(Sound.PRAY_RANGED);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
@Subscribe
public void onNpcSpawned(NpcSpawned event)
{
diff --git a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java
index 39030080e5..058336e738 100644
--- a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java
+++ b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java
@@ -26,55 +26,27 @@
*/
package net.runelite.client.rs;
-import net.runelite.api.Client;
+import java.net.URLClassLoader;
import java.applet.Applet;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.net.HttpURLConnection;
import java.net.URL;
-import java.net.URLConnection;
-import java.nio.channels.Channels;
-import java.nio.channels.ReadableByteChannel;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import java.util.jar.Manifest;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import lombok.extern.slf4j.Slf4j;
-import static net.runelite.client.RuneLite.RUNELITE_DIR;
-import static net.runelite.client.rs.ClientUpdateCheckMode.AUTO;
-import static net.runelite.client.rs.ClientUpdateCheckMode.CUSTOM;
-import static net.runelite.client.rs.ClientUpdateCheckMode.VANILLA;
-import net.runelite.http.api.RuneLiteAPI;
-import okhttp3.Request;
-import okhttp3.Response;
@Slf4j
@Singleton
public class ClientLoader
{
- private static final File LOCAL_INJECTED_CLIENT = new File("./injected-client/target/injected-client-" + RuneLiteAPI.getVersion() + ".jar");
- private static final File INJECTED_CLIENT = new File(RUNELITE_DIR + "/injected-client.jar");
private final ClientConfigLoader clientConfigLoader;
private ClientUpdateCheckMode updateCheckMode;
public static boolean useLocalInjected = false;
@Inject
private ClientLoader(
- @Named("updateCheckMode") final ClientUpdateCheckMode updateCheckMode,
- final ClientConfigLoader clientConfigLoader)
+ @Named("updateCheckMode") final ClientUpdateCheckMode updateCheckMode,
+ final ClientConfigLoader clientConfigLoader)
{
this.updateCheckMode = updateCheckMode;
this.clientConfigLoader = clientConfigLoader;
@@ -84,127 +56,27 @@ public class ClientLoader
{
try
{
- updateCheckMode = CUSTOM;
- Manifest manifest = new Manifest();
- manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
- RSConfig config = clientConfigLoader.fetch();
+ final RSConfig config = clientConfigLoader.fetch();
- Map zipFile = new HashMap<>();
-
- if (updateCheckMode == VANILLA)
+ switch (updateCheckMode)
{
- Certificate[] jagexCertificateChain = getJagexCertificateChain();
- String codebase = config.getCodeBase();
- String initialJar = config.getInitialJar();
- URL url = new URL(codebase + initialJar);
- Request request = new Request.Builder()
- .url(url)
- .build();
-
- try (Response response = RuneLiteAPI.CLIENT.newCall(request).execute())
- {
- JarInputStream jis;
-
- jis = new JarInputStream(response.body().byteStream());
- byte[] tmp = new byte[4096];
- ByteArrayOutputStream buffer = new ByteArrayOutputStream(756 * 1024);
- for (; ; )
- {
- JarEntry metadata = jis.getNextJarEntry();
- if (metadata == null)
- {
- break;
- }
-
- buffer.reset();
- for (; ; )
- {
- int n = jis.read(tmp);
- if (n <= -1)
- {
- break;
- }
- buffer.write(tmp, 0, n);
- }
-
- if (!Arrays.equals(metadata.getCertificates(), jagexCertificateChain))
- {
- if (metadata.getName().startsWith("META-INF/"))
- {
- // META-INF/JAGEXLTD.SF and META-INF/JAGEXLTD.RSA are not signed, but we don't need
- // anything in META-INF anyway.
- continue;
- }
- else
- {
- throw new VerificationException("Unable to verify jar entry: " + metadata.getName());
- }
- }
-
- zipFile.put(metadata.getName(), buffer.toByteArray());
- }
- }
+ case AUTO:
+ case CUSTOM:
+ return loadRLPlus(config);
+ default:
+ case VANILLA:
+ return loadVanilla(config);
+ case NONE:
+ return null;
}
- else if (updateCheckMode == CUSTOM || useLocalInjected)
- {
- log.info("Loading injected client from {}", LOCAL_INJECTED_CLIENT.getAbsolutePath());
- loadJar(zipFile, LOCAL_INJECTED_CLIENT);
- }
- else if (updateCheckMode == AUTO)
- {
- URL url = new URL("https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/injected-client.jar");
- ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream());
- INJECTED_CLIENT.mkdirs();
-
- if (!INJECTED_CLIENT.exists() || getFileSize(INJECTED_CLIENT.toURI().toURL()) != getFileSize(url))
- {
- log.info("{} injected client", INJECTED_CLIENT.exists() ? "Updating" : "Initializing");
- INJECTED_CLIENT.delete();
- INJECTED_CLIENT.createNewFile();
- updateInjectedClient(readableByteChannel);
- }
-
- log.info("Loading injected client from {}", INJECTED_CLIENT.getAbsolutePath());
- loadJar(zipFile, INJECTED_CLIENT);
- }
-
- String initialClass = config.getInitialClass();
-
- ClassLoader rsClassLoader = new ClassLoader(ClientLoader.class.getClassLoader())
- {
- @Override
- protected Class> findClass(String name) throws ClassNotFoundException
- {
- String path = name.replace('.', '/').concat(".class");
- byte[] data = zipFile.get(path);
- if (data == null)
- {
- throw new ClassNotFoundException(name);
- }
-
- return defineClass(name, data, 0, data.length);
- }
- };
-
- Class> clientClass = rsClassLoader.loadClass(initialClass);
-
- Applet rs = (Applet) clientClass.newInstance();
- rs.setStub(new Launcher());
-
- if (rs instanceof Client)
- {
- log.info("client-patch 420 blaze it RL pricks");
- }
-
- return rs;
}
- catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException | SecurityException | VerificationException | CertificateException e)
+ catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException e)
{
if (e instanceof ClassNotFoundException)
{
log.error("Unable to load client - class not found. This means you"
- + " are not running RuneLite with Maven as the client patch"
- + " is not in your classpath.");
+ + " are not running RuneLite with Maven as the injected client"
+ + " is not in your classpath.");
}
log.error("Error loading RS!", e);
@@ -212,66 +84,31 @@ public class ClientLoader
}
}
- private static int getFileSize(URL url) throws IOException
+ private static Applet loadRLPlus(final RSConfig config) throws ClassNotFoundException, InstantiationException, IllegalAccessException
{
- URLConnection conn = null;
- try
- {
- conn = url.openConnection();
- if (conn instanceof HttpURLConnection)
- {
- ((HttpURLConnection) conn).setRequestMethod("HEAD");
- }
- conn.getInputStream();
- return conn.getContentLength();
- }
- finally
- {
- if (conn instanceof HttpURLConnection)
- {
- ((HttpURLConnection) conn).disconnect();
- }
- }
+ // the injected client is a runtime scoped dependency
+ final Class> clientClass = ClientLoader.class.getClassLoader().loadClass(config.getInitialClass());
+ return loadFromClass(config, clientClass);
}
- private void updateInjectedClient(ReadableByteChannel readableByteChannel) throws IOException
+ private static Applet loadVanilla(final RSConfig config) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException
{
- FileOutputStream fileOutputStream = new FileOutputStream(INJECTED_CLIENT);
- fileOutputStream.getChannel()
- .transferFrom(readableByteChannel, 0, Integer.MAX_VALUE);
+ final String codebase = config.getCodeBase();
+ final String initialJar = config.getInitialJar();
+ final String initialClass = config.getInitialClass();
+ final URL url = new URL(codebase + initialJar);
+
+ // Must set parent classloader to null, or it will pull from
+ // this class's classloader first
+ final URLClassLoader classloader = new URLClassLoader(new URL[]{url}, null);
+ final Class> clientClass = classloader.loadClass(initialClass);
+ return loadFromClass(config, clientClass);
}
- private static Certificate[] getJagexCertificateChain() throws CertificateException
+ private static Applet loadFromClass(final RSConfig config, final Class> clientClass) throws IllegalAccessException, InstantiationException
{
- CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
- Collection extends Certificate> certificates = certificateFactory.generateCertificates(ClientLoader.class.getResourceAsStream("jagex.crt"));
- return certificates.toArray(new Certificate[0]);
- }
-
- private static void loadJar(Map toMap, File fromFile) throws IOException
- {
- JarInputStream fis = new JarInputStream(new FileInputStream(fromFile));
- byte[] tmp = new byte[4096];
- ByteArrayOutputStream buffer = new ByteArrayOutputStream(756 * 1024);
- for (; ; )
- {
- JarEntry metadata = fis.getNextJarEntry();
- if (metadata == null)
- {
- break;
- }
-
- buffer.reset();
- for (; ; )
- {
- int n = fis.read(tmp);
- if (n <= -1)
- {
- break;
- }
- buffer.write(tmp, 0, n);
- }
- toMap.put(metadata.getName(), buffer.toByteArray());
- }
+ final Applet rs = (Applet) clientClass.newInstance();
+ rs.setStub(new RSAppletStub(config));
+ return rs;
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Artifact.java b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Artifact.java
deleted file mode 100644
index 466dfbcf11..0000000000
--- a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Artifact.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package net.runelite.client.util.bootstrap;
-
-public class Artifact
-{
- String hash;
- String name;
- String path;
- String size;
-}
diff --git a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrap.java b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrap.java
index b6e3acde55..b8e6d60d94 100644
--- a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrap.java
+++ b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Bootstrap.java
@@ -14,7 +14,16 @@ import net.runelite.http.api.RuneLiteAPI;
public class Bootstrap
{
- Artifact[] artifacts = getArtifacts();
+ class Artifact
+ {
+ String hash;
+ String name;
+ String path;
+ String size;
+ }
+
+ String buildCommit = "2d0c2b8eb66a8088b41b29d42ec2a58ead460581";
+ private Artifact[] artifacts = getArtifacts();
Client client = new Client();
String[] clientJvm9Arguments = new String[]{
"-XX:+DisableAttachMechanism",
@@ -44,54 +53,32 @@ public class Bootstrap
"-XX:+UseParNewGC",
"-Djna.nosys=true"};
- public Bootstrap()
+ Bootstrap()
{
}
public static String getChecksumObject(Serializable object) throws IOException, NoSuchAlgorithmException
{
- ByteArrayOutputStream baos = null;
- ObjectOutputStream oos = null;
- try
+ try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos))
{
- baos = new ByteArrayOutputStream();
- oos = new ObjectOutputStream(baos);
oos.writeObject(object);
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] thedigest = md.digest(baos.toByteArray());
return DatatypeConverter.printHexBinary(thedigest);
}
- finally
- {
- oos.close();
- baos.close();
- }
}
- private static String getChecksumFile(String filepath) throws IOException
+ private static String getChecksumFile(String filepath) throws IOException, NoSuchAlgorithmException
{
System.out.println("Generating Hash for " + filepath);
- MessageDigest md = null;
- try
- {
- md = MessageDigest.getInstance("SHA-256");
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
+ MessageDigest md = MessageDigest.getInstance("SHA-256");
+
try (DigestInputStream dis = new DigestInputStream(new FileInputStream(filepath), md))
{
- while (dis.read() != -1)
- {
- //empty loop to clear the data
- }
+ //empty loop to clear the data
+ while (dis.read() != -1);
md = dis.getMessageDigest();
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
return bytesToHex(md.digest());
@@ -109,11 +96,11 @@ public class Bootstrap
}
- public Artifact[] getArtifacts()
+ private Artifact[] getArtifacts()
{
try
{
- artifacts = new Artifact[42];
+ artifacts = new Artifact[43];
//Static artifacts
artifacts[0] = new Artifact();
@@ -328,8 +315,13 @@ public class Bootstrap
artifacts[37].hash = getChecksumFile("./http-api/target/" + artifacts[37].name);
artifacts[37].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[37].name;
artifacts[37].size = Long.toString(getFileSize("./http-api/target/" + artifacts[37].name));
+ artifacts[42] = new Artifact();
+ artifacts[42].name = "injected-client-" + RuneLiteAPI.getVersion() + ".jar";
+ artifacts[42].hash = getChecksumFile("./injected-client/target/" + artifacts[42].name);
+ artifacts[42].path = "https://raw.githubusercontent.com/runelite-extended/maven-repo/master/live/" + artifacts[42].name;
+ artifacts[42].size = Long.toString(getFileSize("./injected-client/target/" + artifacts[42].name));
}
- catch (IOException e)
+ catch (IOException | NoSuchAlgorithmException e)
{
e.printStackTrace();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Client.java b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Client.java
index 59b1c60ff9..c2ecf9da72 100644
--- a/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Client.java
+++ b/runelite-client/src/main/java/net/runelite/client/util/bootstrap/Client.java
@@ -8,5 +8,5 @@ public class Client
String extension = "jar";
String groupId = "net.runelite";
String properties = "";
- String version = "1.5.27";
+ String version = "1.5.28";
}
diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json
index 8105a02ee2..987169cb75 100644
--- a/runelite-client/src/main/resources/item_variations.json
+++ b/runelite-client/src/main/resources/item_variations.json
@@ -176,6 +176,10 @@
237,
1487
],
+ "wine of zamorak": [
+ 245,
+ 23489
+ ],
"key": [
275,
423,
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_30px.png
similarity index 100%
rename from runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back.png
rename to runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_30px.png
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_large.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_90px.png
similarity index 100%
rename from runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_large.png
rename to runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/back_90px.png
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_30px.png
similarity index 100%
rename from runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front.png
rename to runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_30px.png
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_large.png b/runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_90px.png
similarity index 100%
rename from runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_large.png
rename to runelite-client/src/main/resources/net/runelite/client/plugins/interfacestyles/2010/healthbar/front_90px.png
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_crafting.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_crafting.json
index 69a8d2d54f..0d098baf3a 100644
--- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_crafting.json
+++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_crafting.json
@@ -367,12 +367,30 @@
"name": "Topaz Amulet (U)",
"xp": 80
},
+ {
+ "level": 45,
+ "icon": 6328,
+ "name": "Snakeskin boots",
+ "xp": 30
+ },
{
"level": 46,
"icon": 567,
"name": "Unpowered Orb",
"xp": 52.5
},
+ {
+ "level": 47,
+ "icon": 6330,
+ "name": "Snakeskin vambraces",
+ "xp": 35
+ },
+ {
+ "level": 48,
+ "icon": 6326,
+ "name": "Snakeskin bandana",
+ "xp": 45
+ },
{
"level": 49,
"icon": 4542,
@@ -385,6 +403,18 @@
"name": "Ruby Amulet (U)",
"xp": 85
},
+ {
+ "level": 51,
+ "icon": 6324,
+ "name": "Snakeskin chaps",
+ "xp": 50
+ },
+ {
+ "level": 53,
+ "icon": 6322,
+ "name": "Snakeskin body",
+ "xp": 55
+ },
{
"level": 54,
"icon": 1395,
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_completed_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_completed_icon.png
new file mode 100644
index 0000000000..71193ddba2
Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_completed_icon.png differ
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_not_started_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_not_started_icon.png
new file mode 100644
index 0000000000..c383d269ce
Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_not_started_icon.png differ
diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_started_icon.png b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_started_icon.png
new file mode 100644
index 0000000000..bd23865486
Binary files /dev/null and b/runelite-client/src/main/resources/net/runelite/client/plugins/worldmap/quest_started_icon.png differ
diff --git a/runelite-client/src/main/scripts/DeathkeepBuild.hash b/runelite-client/src/main/scripts/DeathkeepBuild.hash
new file mode 100644
index 0000000000..18f92dce5c
--- /dev/null
+++ b/runelite-client/src/main/scripts/DeathkeepBuild.hash
@@ -0,0 +1 @@
+15F58F5939D9311F3D76FA2F0F3441B7B0DA1E8EAE23C654948095A7D51E07F0
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/DeathkeepBuild.rs2asm b/runelite-client/src/main/scripts/DeathkeepBuild.rs2asm
new file mode 100644
index 0000000000..75ade43db2
--- /dev/null
+++ b/runelite-client/src/main/scripts/DeathkeepBuild.rs2asm
@@ -0,0 +1,634 @@
+.id 1601
+.int_stack_count 4
+.string_stack_count 2
+.int_var_count 14
+.string_var_count 3
+; callback "itemsKeptOnDeath"
+; Used by the ItemsKepthOnDeath plugin to edit the interface
+; Put a rune pouch in your inventory and it shouldn't have a white outline
+; in the Items kept on death screen
+ sload 1
+ iconst 262167
+ if_settext
+ iconst 0
+ istore 4
+ iconst 0
+ istore 5
+ iconst -1
+ istore 6
+ iconst 0
+ istore 7
+ sconst ""
+ sstore 2
+ iconst 0
+ istore 8
+ iconst 0
+ istore 9
+ iconst 0
+ istore 10
+ iconst 0
+ istore 11
+ iload 1
+ define_array 111
+ iconst 0
+ istore 12
+ iconst 0
+ istore 13
+ iload 0
+ iconst 0
+ if_icmpeq LABEL31
+ jump LABEL525
+LABEL31:
+ iconst 93
+ iconst 13190
+ inv_total
+ iconst 0
+ if_icmpgt LABEL42
+ iconst 93
+ iconst 13192
+ inv_total
+ iconst 0
+ if_icmpgt LABEL42
+ jump LABEL44
+LABEL42:
+ iconst 1
+ istore 9
+LABEL44:
+ iload 10
+ iload 1
+ if_icmplt LABEL48
+ jump LABEL88
+LABEL48:
+ iconst 584
+ iload 11
+ inv_getobj
+ istore 6
+ iload 6
+ iconst -1
+ if_icmpne LABEL56
+ jump LABEL85
+LABEL56:
+ iconst 584
+ iload 11
+ inv_getnum
+ istore 7
+LABEL60:
+ iload 10
+ iload 1
+ if_icmplt LABEL64
+ jump LABEL80
+LABEL64:
+ iload 7
+ iconst 0
+ if_icmpgt LABEL68
+ jump LABEL80
+LABEL68:
+ iload 10
+ iload 6
+ set_array_int
+ iload 7
+ iconst 1
+ sub
+ istore 7
+ iload 10
+ iconst 1
+ add
+ istore 10
+ jump LABEL60
+LABEL80:
+ iload 11
+ iconst 1
+ add
+ istore 11
+ jump LABEL87
+LABEL85:
+ iload 1
+ istore 10
+LABEL87:
+ jump LABEL44
+LABEL88:
+ iload 4
+ iload 1
+ if_icmplt LABEL92
+ jump LABEL147
+LABEL92:
+ iconst 262162
+ iconst 5
+ iload 4
+ cc_create
+ iconst 36
+ iconst 32
+ iconst 0
+ iconst 0
+ cc_setsize
+ iconst 5
+ iload 4
+ iconst 40
+ multiply
+ add
+ iconst 25
+ iconst 0
+ iconst 0
+ cc_setposition
+ iload 4
+ get_array_int
+ istore 6
+ iload 6
+ iconst -1
+ if_icmpne LABEL117
+ jump LABEL144
+LABEL117:
+ iload 6
+ iconst 1
+ cc_setobject
+ sconst "
"
+ sconst ", so you will always keep zero items."
+ join_string 5
+ append
+ sstore 2
+ jump LABEL434
+LABEL371:
+ iload 1
+ iconst 0
+ if_icmpeq LABEL375
+ jump LABEL387
+LABEL375:
+ sload 2
+ sconst "You're marked with a "
+ sconst "
"
+ sconst "PK skull"
+ sconst "
"
+ sconst ". This reduces the items you keep from "
+ sconst "three"
+ sconst " to zero!"
+ join_string 7
+ append
+ sstore 2
+ jump LABEL434
+LABEL387:
+ iload 1
+ iconst 1
+ if_icmpeq LABEL391
+ jump LABEL410
+LABEL391:
+ sload 2
+ sconst "You're marked with a "
+ sconst "
"
+ sconst "PK skull"
+ sconst "
"
+ sconst ". This reduces the items you keep from "
+ sconst "three"
+ sconst " to zero!"
+ sconst " "
+ sconst " "
+ sconst "However, you also have the "
+ sconst "
"
+ sconst "Protect Items"
+ sconst "
"
+ sconst " prayer active, which saves you one extra item!"
+ join_string 14
+ append
+ sstore 2
+ jump LABEL434
+LABEL410:
+ iload 1
+ iconst 3
+ if_icmpeq LABEL414
+ jump LABEL419
+LABEL414:
+ sload 2
+ sconst "You have no factors affecting the items you keep."
+ append
+ sstore 2
+ jump LABEL434
+LABEL419:
+ iload 1
+ iconst 3
+ iconst 1
+ add
+ if_icmpeq LABEL425
+ jump LABEL434
+LABEL425:
+ sload 2
+ sconst "You have the "
+ sconst "
"
+ sconst "Bonds"
+ sconst ""
+ sconst " are always protected, so are not shown here."
+ join_string 6
+ append
+ sstore 2
+LABEL492:
+ sload 2
+ iconst 262173
+ if_settext
+ sconst "
"
+ sconst "Max items kept on death :"
+ sconst " "
+ sconst " "
+ sconst "
"
+ sconst "~ "
+ iload 1
+ tostring
+ sconst " ~"
+ join_string 8
+ iconst 262174
+ if_settext
+ iload 2
+ iconst 0
+ if_icmpgt LABEL511
+ jump LABEL518
+LABEL511:
+ sconst "Items you will keep on death:"
+ iconst 262161
+ if_settext
+ sconst "Items you will lose on death:"
+ iconst 262164
+ if_settext
+ jump LABEL524
+LABEL518:
+ sconst "Items you will keep on death if not skulled:"
+ iconst 262161
+ if_settext
+ sconst "Items you will lose on death if not skulled:"
+ iconst 262164
+ if_settext
+LABEL524:
+ jump LABEL565
+LABEL525:
+ iconst 1
+ iconst 262165
+ if_sethide
+ iconst 1
+ iconst 262162
+ if_sethide
+ iconst 0
+ iconst 262175
+ if_sethide
+ sload 0
+ iconst 262176
+ if_settext
+ sconst "The normal amount of items kept is "
+ sconst "three"
+ sconst "."
+ sconst " "
+ sconst " "
+ join_string 5
+ sstore 2
+ sload 2
+ sconst "You're in a "
+ sconst "
"
+ sconst "safe area"
+ sconst "
"
+ sconst ". See information to the left for a more detailed description."
+ join_string 5
+ append
+ sstore 2
+ sload 2
+ iconst 262173
+ if_settext
+ sconst "
"
+ sconst "Max items kept on death :"
+ sconst " "
+ sconst " "
+ sconst "
"
+ sconst "All items!"
+ join_string 6
+ iconst 262174
+ if_settext
+LABEL565:
+ sconst "itemsKeptOnDeath" ; push event name
+ runelite_callback ; invoke callback
+ return
diff --git a/runelite-client/src/main/scripts/FakeXPDrops.rs2asm b/runelite-client/src/main/scripts/FakeXPDrops.rs2asm
index 212034768a..0a61b8b13a 100644
--- a/runelite-client/src/main/scripts/FakeXPDrops.rs2asm
+++ b/runelite-client/src/main/scripts/FakeXPDrops.rs2asm
@@ -7,6 +7,8 @@
iload 1
sconst "fakeXpDrop"
runelite_callback ;
+ pop_int
+ pop_int
iconst 105
iconst 83
iconst 681
diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/emojis/EmojiPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/emojis/EmojiPluginTest.java
new file mode 100644
index 0000000000..3427246946
--- /dev/null
+++ b/runelite-client/src/test/java/net/runelite/client/plugins/emojis/EmojiPluginTest.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2019, Adam
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.plugins.emojis;
+
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.testing.fieldbinder.Bind;
+import com.google.inject.testing.fieldbinder.BoundFieldModule;
+import net.runelite.api.ChatMessageType;
+import net.runelite.api.Client;
+import net.runelite.api.GameState;
+import net.runelite.api.IndexedSprite;
+import net.runelite.api.MessageNode;
+import net.runelite.api.events.ChatMessage;
+import net.runelite.api.events.GameStateChanged;
+import net.runelite.client.chat.ChatMessageManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class EmojiPluginTest
+{
+ @Mock
+ @Bind
+ private Client client;
+
+ @Mock
+ @Bind
+ private ChatMessageManager chatMessageManager;
+
+ @Inject
+ private EmojiPlugin emojiPlugin;
+
+ @Before
+ public void before()
+ {
+ Guice.createInjector(BoundFieldModule.of(this)).injectMembers(this);
+ }
+
+ @Test
+ public void testOnChatMessage()
+ {
+ when(client.getGameState()).thenReturn(GameState.LOGGED_IN);
+ when(client.getModIcons()).thenReturn(new IndexedSprite[0]);
+ when(client.createIndexedSprite()).thenReturn(mock(IndexedSprite.class));
+
+ // Trip emoji loading
+ GameStateChanged gameStateChanged = new GameStateChanged();
+ gameStateChanged.setGameState(GameState.LOGGED_IN);
+ emojiPlugin.onGameStateChanged(gameStateChanged);
+
+ MessageNode messageNode = mock(MessageNode.class);
+ // With chat recolor, message may be wrapped in col tags
+ when(messageNode.getValue()).thenReturn("