From 3c920ead9a83be7f16ff35cdb7b6a0626ac49da1 Mon Sep 17 00:00:00 2001 From: Matthew C Date: Mon, 7 Sep 2020 01:42:53 +0900 Subject: [PATCH 01/31] timers: Add Mage Arena 2 teleblock timers --- .../runelite/client/plugins/timers/GameTimer.java | 2 ++ .../runelite/client/plugins/timers/TimersPlugin.java | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index bc751e4178..2bbdae61d6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -50,6 +50,8 @@ enum GameTimer HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Half Teleblock", 150, ChronoUnit.SECONDS, true), DMM_FULLTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Deadman Mode Full Teleblock", 150, ChronoUnit.SECONDS, true), DMM_HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Deadman Mode Half Teleblock", 75, ChronoUnit.SECONDS, true), + MAGE_ARENA_FULLTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Mage Arena 2 Full Teleblock", 2, ChronoUnit.MINUTES, true), + MAGE_ARENA_HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Mage Arena 2 Half Teleblock", 1, ChronoUnit.MINUTES, true), SUPERANTIFIRE(ItemID.SUPER_ANTIFIRE_POTION4, GameTimerImageType.ITEM, "Super antifire", 3, ChronoUnit.MINUTES), BIND(SpriteID.SPELL_BIND, GameTimerImageType.SPRITE, "Bind", GraphicID.BIND, 8, GAME_TICKS, true), SNARE(SpriteID.SPELL_SNARE, GameTimerImageType.SPRITE, "Snare", GraphicID.SNARE, 16, GAME_TICKS, true), 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 caefdac45e..243250b880 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 @@ -117,6 +117,8 @@ public class TimersPlugin extends Plugin private static final Pattern DEADMAN_HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 1 minute, 15 seconds\\."); private static final Pattern FULL_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 5 minutes\\."); private static final Pattern HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 2 minutes, 30 seconds\\."); + private static final Pattern MAGE_ARENA_FULL_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you\\. It will expire in 2 minutes\\."); + private static final Pattern MAGE_ARENA_HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you\\. It will expire in 1 minute\\."); private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\."); private static final int VENOM_VALUE_CUTOFF = -40; // Antivenom < -40 <= Antipoison < 0 private static final int POISON_TICK_LENGTH = 30; @@ -559,6 +561,14 @@ public class TimersPlugin extends Plugin { createGameTimer(DMM_HALFTB); } + else if (MAGE_ARENA_FULL_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) + { + createGameTimer(MAGE_ARENA_FULLTB); + } + else if (MAGE_ARENA_HALF_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) + { + createGameTimer(MAGE_ARENA_HALFTB); + } else if (event.getMessage().contains(KILLED_TELEBLOCK_OPPONENT_TEXT)) { removeTbTimers(); @@ -1071,5 +1081,7 @@ public class TimersPlugin extends Plugin removeGameTimer(HALFTB); removeGameTimer(DMM_FULLTB); removeGameTimer(DMM_HALFTB); + removeGameTimer(MAGE_ARENA_FULLTB); + removeGameTimer(MAGE_ARENA_HALFTB); } } From 230bba0ea7a4f9a8931f3517de8cc86355ac6a2e Mon Sep 17 00:00:00 2001 From: Matthew C <66925241+Matthew-nop@users.noreply.github.com> Date: Wed, 9 Sep 2020 12:30:41 +0900 Subject: [PATCH 02/31] corp: Add toggle for dark energy core highlighting (#12462) --- .../runelite/client/plugins/corp/CoreOverlay.java | 9 ++++++++- .../runelite/client/plugins/corp/CorpConfig.java | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java index 29c7dff16a..066a641328 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java @@ -40,19 +40,26 @@ class CoreOverlay extends Overlay { private final Client client; private final CorpPlugin corpPlugin; + private final CorpConfig config; @Inject - private CoreOverlay(Client client, CorpPlugin corpPlugin) + private CoreOverlay(Client client, CorpPlugin corpPlugin, CorpConfig corpConfig) { setPosition(OverlayPosition.DYNAMIC); setLayer(OverlayLayer.ABOVE_SCENE); this.client = client; this.corpPlugin = corpPlugin; + this.config = corpConfig; } @Override public Dimension render(Graphics2D graphics) { + if (!config.markDarkCore()) + { + return null; + } + NPC core = corpPlugin.getCore(); if (core != null) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CorpConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CorpConfig.java index 13475f7c44..e0103ead43 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CorpConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CorpConfig.java @@ -35,10 +35,21 @@ public interface CorpConfig extends Config keyName = "showDamage", name = "Show damage overlay", description = "Show total damage overlay", - position = 2 + position = 0 ) default boolean showDamage() { return true; } + + @ConfigItem( + keyName = "markDarkCore", + name = "Mark dark core", + description = "Marks the dark energy core.", + position = 1 + ) + default boolean markDarkCore() + { + return true; + } } From 6fd2eb5e63014255d159a823da50c59e975d52d3 Mon Sep 17 00:00:00 2001 From: Matthew C Date: Wed, 9 Sep 2020 13:18:07 +0900 Subject: [PATCH 03/31] slayer: Sort Task enum alphabetically --- .../runelite/client/plugins/slayer/Task.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java index 04c4fdd43f..05eff29b20 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java @@ -45,13 +45,12 @@ enum Task ALCHEMICAL_HYDRA("Alchemical Hydra", ItemID.IKKLE_HYDRA), ANKOU("Ankou", ItemID.ANKOU_MASK), AVIANSIES("Aviansies", ItemID.ENSOULED_AVIANSIE_HEAD), + BANDITS("Bandits", ItemID.BANDIT, "Bandit"), BANSHEES("Banshees", ItemID.BANSHEE), BARROWS_BROTHERS("Barrows Brothers", ItemID.KARILS_COIF), BASILISKS("Basilisks", ItemID.BASILISK), BATS("Bats", ItemID.GIRAL_BAT_2), BEARS("Bears", ItemID.ENSOULED_BEAR_HEAD), - ENTS("Ents", ItemID.NICE_TREE, "Ent"), - LAVA_DRAGONS("Lava Dragons", ItemID.LAVA_SCALE, "Lava dragon"), BIRDS("Birds", ItemID.FEATHER, "Chicken", "Rooster", "Terrorbird", "Seagull"), BLACK_DEMONS("Black demons", ItemID.BLACK_DEMON_MASK), BLACK_DRAGONS("Black dragons", ItemID.BLACK_DRAGON_MASK, "Baby black dragon"), @@ -67,6 +66,7 @@ enum Task CAVE_KRAKEN("Cave kraken", ItemID.CAVE_KRAKEN), CAVE_SLIMES("Cave slimes", ItemID.SWAMP_CAVE_SLIME), CERBERUS("Cerberus", ItemID.HELLPUPPY), + CHAOS_DRUIDS("Chaos druids", ItemID.ELDER_CHAOS_HOOD, "Elder Chaos druid", "Chaos druid"), CHAOS_ELEMENTAL("Chaos Elemental", ItemID.PET_CHAOS_ELEMENTAL), CHAOS_FANATIC("Chaos Fanatic", ItemID.ANCIENT_STAFF), COCKATRICE("Cockatrice", ItemID.COCKATRICE, "Cockathrice"), @@ -85,16 +85,16 @@ enum Task DWARVES("Dwarves", ItemID.DWARVEN_HELMET, "Dwarf"), EARTH_WARRIORS("Earth warriors", ItemID.BRONZE_FULL_HELM_T), ELVES("Elves", ItemID.ELF, "Elf", "Iorwerth Warrior"), + ENTS("Ents", ItemID.NICE_TREE, "Ent"), FEVER_SPIDERS("Fever spiders", ItemID.FEVER_SPIDER), FIRE_GIANTS("Fire giants", ItemID.FIRE_BATTLESTAFF), - REVENANTS("Revenants", ItemID.BRACELET_OF_ETHEREUM, "Revenant imp", "Revenant goblin", "Revenant pyrefiend", "Revenant hobgoblin", "Revenant cyclops", "Revenant hellhound", "Revenant demon", "Revenant ork", "Revenant dark beast", "Revenant knight", "Revenant dragon"), FLESH_CRAWLERS("Fleshcrawlers", ItemID.ENSOULED_SCORPION_HEAD, "Flesh crawler"), FOSSIL_ISLAND_WYVERNS("Fossil island wyverns", ItemID.FOSSIL_ISLAND_WYVERN, "Ancient wyvern", "Long-tailed wyvern", "Spitting wyvern", "Taloned wyvern"), GARGOYLES("Gargoyles", ItemID.GARGOYLE, 9, ItemID.ROCK_HAMMER), GENERAL_GRAARDOR("General Graardor", ItemID.PET_GENERAL_GRAARDOR), GHOSTS("Ghosts", ItemID.GHOSTSPEAK_AMULET, "Tortured soul"), - GIANT_MOLE("Giant Mole", ItemID.BABY_MOLE), GHOULS("Ghouls", ItemID.ZOMBIE_HEAD), + GIANT_MOLE("Giant Mole", ItemID.BABY_MOLE), GOBLINS("Goblins", ItemID.ENSOULED_GOBLIN_HEAD), GREATER_DEMONS("Greater demons", ItemID.GREATER_DEMON_MASK), GREEN_DRAGONS("Green dragons", ItemID.GREEN_DRAGON_MASK, "Baby green dragon"), @@ -104,16 +104,15 @@ enum Task HILL_GIANTS("Hill giants", ItemID.ENSOULED_GIANT_HEAD), HOBGOBLINS("Hobgoblins", ItemID.HOBGOBLIN_GUARD), HYDRAS("Hydras", ItemID.HYDRA), + ICEFIENDS("Icefiends", ItemID.ICE_DIAMOND), ICE_GIANTS("Ice giants", ItemID.ICE_DIAMOND), ICE_WARRIORS("Ice warriors", ItemID.MITHRIL_FULL_HELM_T), - ICEFIENDS("Icefiends", ItemID.ICE_DIAMOND), INFERNAL_MAGES("Infernal mages", ItemID.INFERNAL_MAGE, "Malevolent mage"), IRON_DRAGONS("Iron dragons", ItemID.IRON_DRAGON_MASK), JAD("TzTok-Jad", ItemID.TZREKJAD, 25250), JELLIES("Jellies", ItemID.JELLY, "Jelly"), JUNGLE_HORROR("Jungle horrors", ItemID.ENSOULED_HORROR_HEAD), KALPHITE("Kalphite", ItemID.KALPHITE_SOLDIER), - MAMMOTHS("Mammoths", ItemID.ATTACKER_HORN, "Mammoth"), KALPHITE_QUEEN("Kalphite Queen", ItemID.KALPHITE_PRINCESS), KILLERWATTS("Killerwatts", ItemID.KILLERWATT), KING_BLACK_DRAGON("King Black Dragon", ItemID.PRINCE_BLACK_DRAGON), @@ -121,10 +120,12 @@ enum Task KREEARRA("Kree'arra", ItemID.PET_KREEARRA), KRIL_TSUTSAROTH("K'ril Tsutsaroth", ItemID.PET_KRIL_TSUTSAROTH), KURASK("Kurask", ItemID.KURASK), - ROGUES("Rogues", ItemID.ROGUE_MASK, "Rogue"), + LAVA_DRAGONS("Lava Dragons", ItemID.LAVA_SCALE, "Lava dragon"), LESSER_DEMONS("Lesser demons", ItemID.LESSER_DEMON_MASK), - LIZARDS("Lizards", ItemID.DESERT_LIZARD, "Desert lizard", "Sulphur lizard", "Small lizard", "Lizard"), LIZARDMEN("Lizardmen", ItemID.LIZARDMAN_FANG, "Lizardman"), + LIZARDS("Lizards", ItemID.DESERT_LIZARD, "Desert lizard", "Sulphur lizard", "Small lizard", "Lizard"), + MAGIC_AXES("Magic axes", ItemID.IRON_BATTLEAXE, "Magic axe"), + MAMMOTHS("Mammoths", ItemID.ATTACKER_HORN, "Mammoth"), MINIONS_OF_SCABARAS("Minions of scabaras", ItemID.GOLDEN_SCARAB, "Scarab swarm", "Locust rider", "Scarab mage"), MINOTAURS("Minotaurs", ItemID.ENSOULED_MINOTAUR_HEAD), MITHRIL_DRAGONS("Mithril dragons", ItemID.MITHRIL_DRAGON_MASK), @@ -139,13 +140,12 @@ enum Task PYREFIENDS("Pyrefiends", ItemID.PYREFIEND, "Flaming pyrelord"), RATS("Rats", ItemID.RATS_TAIL), RED_DRAGONS("Red dragons", ItemID.BABY_RED_DRAGON, "Baby red dragon"), + REVENANTS("Revenants", ItemID.BRACELET_OF_ETHEREUM, "Revenant imp", "Revenant goblin", "Revenant pyrefiend", "Revenant hobgoblin", "Revenant cyclops", "Revenant hellhound", "Revenant demon", "Revenant ork", "Revenant dark beast", "Revenant knight", "Revenant dragon"), ROCKSLUGS("Rockslugs", ItemID.ROCKSLUG, 4, ItemID.BAG_OF_SALT), + ROGUES("Rogues", ItemID.ROGUE_MASK, "Rogue"), RUNE_DRAGONS("Rune dragons", ItemID.RUNE_DRAGON_MASK), - SCORPIA("Scorpia", ItemID.SCORPIAS_OFFSPRING), - CHAOS_DRUIDS("Chaos druids", ItemID.ELDER_CHAOS_HOOD, "Elder Chaos druid", "Chaos druid"), - BANDITS("Bandits", ItemID.BANDIT, "Bandit"), - MAGIC_AXES("Magic axes", ItemID.IRON_BATTLEAXE, "Magic axe"), SARACHNIS("Sarachnis", ItemID.SRARACHA), + SCORPIA("Scorpia", ItemID.SCORPIAS_OFFSPRING), SCORPIONS("Scorpions", ItemID.ENSOULED_SCORPION_HEAD), SEA_SNAKES("Sea snakes", ItemID.SNAKE_CORPSE), SHADES("Shades", ItemID.SHADE_ROBE_TOP, "Loar Shadow", "Loar Shade", "Phrin Shadow", "Phrin Shade", "Riyl Shadow", "Riyl Shade", "Asyn Shadow", "Asyn Shade", "Fiyr Shadow", "Fiyr Shade"), @@ -176,8 +176,8 @@ enum Task WYRMS("Wyrms", ItemID.WYRM), ZILYANA("Commander Zilyana", ItemID.PET_ZILYANA), ZOMBIES("Zombies", ItemID.ZOMBIE_HEAD, "Undead"), - ZULRAH("Zulrah", ItemID.PET_SNAKELING), - ZUK("TzKal-Zuk", ItemID.TZREKZUK, 101890); + ZUK("TzKal-Zuk", ItemID.TZREKZUK, 101890), + ZULRAH("Zulrah", ItemID.PET_SNAKELING); // private static final Map tasks; From e2f848fbbf522c42f8b28c6c36ba71d48bdeade9 Mon Sep 17 00:00:00 2001 From: Matthew C Date: Wed, 9 Sep 2020 13:20:13 +0900 Subject: [PATCH 04/31] slayer: Add black knights and pirates --- .../src/main/java/net/runelite/client/plugins/slayer/Task.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java index 05eff29b20..6407c933e1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/slayer/Task.java @@ -54,6 +54,7 @@ enum Task BIRDS("Birds", ItemID.FEATHER, "Chicken", "Rooster", "Terrorbird", "Seagull"), BLACK_DEMONS("Black demons", ItemID.BLACK_DEMON_MASK), BLACK_DRAGONS("Black dragons", ItemID.BLACK_DRAGON_MASK, "Baby black dragon"), + BLACK_KNIGHTS("Black Knights", ItemID.BLACK_FULL_HELM, "Black Knight"), BLOODVELD("Bloodveld", ItemID.BLOODVELD), BLUE_DRAGONS("Blue dragons", ItemID.BLUE_DRAGON_MASK, "Baby blue dragon"), BRINE_RATS("Brine rats", ItemID.BRINE_RAT), @@ -137,6 +138,7 @@ enum Task NECHRYAEL("Nechryael", ItemID.NECHRYAEL, "Nechryarch"), OGRES("Ogres", ItemID.ENSOULED_OGRE_HEAD), OTHERWORLDLY_BEING("Otherworldly beings", ItemID.GHOSTLY_HOOD), + PIRATES("Pirates", ItemID.PIRATE_HAT, "Pirate"), PYREFIENDS("Pyrefiends", ItemID.PYREFIEND, "Flaming pyrelord"), RATS("Rats", ItemID.RATS_TAIL), RED_DRAGONS("Red dragons", ItemID.BABY_RED_DRAGON, "Baby red dragon"), From d2c72d6cbe08f55986e98388478b2302ee437718 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 8 Sep 2020 23:40:52 -0400 Subject: [PATCH 05/31] core overlay: cleanup Avoid checking config if there is no core npc --- .../runelite/client/plugins/corp/CoreOverlay.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java index 066a641328..7dc5ec8033 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/corp/CoreOverlay.java @@ -29,7 +29,6 @@ import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Polygon; import javax.inject.Inject; -import net.runelite.api.Client; import net.runelite.api.NPC; import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.OverlayLayer; @@ -38,16 +37,14 @@ import net.runelite.client.ui.overlay.OverlayUtil; class CoreOverlay extends Overlay { - private final Client client; private final CorpPlugin corpPlugin; private final CorpConfig config; @Inject - private CoreOverlay(Client client, CorpPlugin corpPlugin, CorpConfig corpConfig) + private CoreOverlay(CorpPlugin corpPlugin, CorpConfig corpConfig) { setPosition(OverlayPosition.DYNAMIC); setLayer(OverlayLayer.ABOVE_SCENE); - this.client = client; this.corpPlugin = corpPlugin; this.config = corpConfig; } @@ -55,13 +52,8 @@ class CoreOverlay extends Overlay @Override public Dimension render(Graphics2D graphics) { - if (!config.markDarkCore()) - { - return null; - } - NPC core = corpPlugin.getCore(); - if (core != null) + if (core != null && config.markDarkCore()) { Polygon canvasTilePoly = core.getCanvasTilePoly(); if (canvasTilePoly != null) From 01447e52a70cdd10bfa7db96946ef7b43afbf149 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 9 Sep 2020 10:37:32 -0400 Subject: [PATCH 06/31] timers: consolidate teleblock timers --- .../client/plugins/timers/GameTimer.java | 9 +-- .../client/plugins/timers/TimersPlugin.java | 58 ++++------------- .../plugins/timers/TimersPluginTest.java | 64 +++++++++++++------ 3 files changed, 59 insertions(+), 72 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index 2bbdae61d6..a751b7f3f9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -46,12 +46,6 @@ enum GameTimer OVERLOAD(ItemID.OVERLOAD_4, GameTimerImageType.ITEM, "Overload", 5, ChronoUnit.MINUTES, true), CANNON(ItemID.CANNON_BARRELS, GameTimerImageType.ITEM, "Cannon", 25, ChronoUnit.MINUTES), MAGICIMBUE(SpriteID.SPELL_MAGIC_IMBUE, GameTimerImageType.SPRITE, "Magic imbue", 21, GAME_TICKS), - FULLTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Full Teleblock", 5, ChronoUnit.MINUTES, true), - HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Half Teleblock", 150, ChronoUnit.SECONDS, true), - DMM_FULLTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Deadman Mode Full Teleblock", 150, ChronoUnit.SECONDS, true), - DMM_HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Deadman Mode Half Teleblock", 75, ChronoUnit.SECONDS, true), - MAGE_ARENA_FULLTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Mage Arena 2 Full Teleblock", 2, ChronoUnit.MINUTES, true), - MAGE_ARENA_HALFTB(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Mage Arena 2 Half Teleblock", 1, ChronoUnit.MINUTES, true), SUPERANTIFIRE(ItemID.SUPER_ANTIFIRE_POTION4, GameTimerImageType.ITEM, "Super antifire", 3, ChronoUnit.MINUTES), BIND(SpriteID.SPELL_BIND, GameTimerImageType.SPRITE, "Bind", GraphicID.BIND, 8, GAME_TICKS, true), SNARE(SpriteID.SPELL_SNARE, GameTimerImageType.SPRITE, "Snare", GraphicID.SNARE, 16, GAME_TICKS, true), @@ -81,7 +75,8 @@ enum GameTimer DIVINE_BASTION(ItemID.DIVINE_BASTION_POTION4, GameTimerImageType.ITEM, "Divine Bastion", 5, ChronoUnit.MINUTES), DIVINE_BATTLEMAGE(ItemID.DIVINE_BATTLEMAGE_POTION4, GameTimerImageType.ITEM, "Divine Battlemage", 5, ChronoUnit.MINUTES), ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison", false), - ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom", false); + ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom", false), + TELEBLOCK(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Teleblock", true); @Nullable private final Duration duration; 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 243250b880..dcf01d3daf 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 @@ -114,11 +114,7 @@ public class TimersPlugin extends Plugin private static final String PRAYER_ENHANCE_EXPIRED = "Your prayer enhance effect has worn off."; private static final String ENDURANCE_EFFECT_MESSAGE = "Your Ring of endurance doubles the duration of your stamina potion's effect."; - private static final Pattern DEADMAN_HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 1 minute, 15 seconds\\."); - private static final Pattern FULL_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 5 minutes\\."); - private static final Pattern HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you by (.+)\\. It will expire in 2 minutes, 30 seconds\\."); - private static final Pattern MAGE_ARENA_FULL_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you\\. It will expire in 2 minutes\\."); - private static final Pattern MAGE_ARENA_HALF_TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you\\. It will expire in 1 minute\\."); + private static final Pattern TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you(?: by .+)?\\. It will expire in (?\\d+) minutes?(?:, (?\\d+) seconds?)?\\."); private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\."); private static final int VENOM_VALUE_CUTOFF = -40; // Antivenom < -40 <= Antipoison < 0 private static final int POISON_TICK_LENGTH = 30; @@ -239,7 +235,7 @@ public class TimersPlugin extends Plugin && inWilderness == 0) { log.debug("Left wilderness in non-PVP world, clearing Teleblock timer."); - removeTbTimers(); + removeGameTimer(TELEBLOCK); } lastWildernessVarb = inWilderness; @@ -366,7 +362,7 @@ public class TimersPlugin extends Plugin if (!config.showTeleblock()) { - removeTbTimers(); + removeGameTimer(TELEBLOCK); } if (!config.showFreezes()) @@ -542,36 +538,18 @@ public class TimersPlugin extends Plugin if (config.showTeleblock()) { - if (FULL_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) + Matcher m = TELEBLOCK_PATTERN.matcher(event.getMessage()); + if (m.find()) { - createGameTimer(FULLTB); - } - else if (HALF_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) - { - if (client.getWorldType().contains(WorldType.DEADMAN)) - { - createGameTimer(DMM_FULLTB); - } - else - { - createGameTimer(HALFTB); - } - } - else if (DEADMAN_HALF_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) - { - createGameTimer(DMM_HALFTB); - } - else if (MAGE_ARENA_FULL_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) - { - createGameTimer(MAGE_ARENA_FULLTB); - } - else if (MAGE_ARENA_HALF_TELEBLOCK_PATTERN.matcher(event.getMessage()).find()) - { - createGameTimer(MAGE_ARENA_HALFTB); + String minss = m.group("mins"); + String secss = m.group("secs"); + int mins = Integer.parseInt(minss); + int secs = secss != null ? Integer.parseInt(secss) : 0; + createGameTimer(TELEBLOCK, Duration.ofSeconds(mins * 60 + secs)); } else if (event.getMessage().contains(KILLED_TELEBLOCK_OPPONENT_TEXT)) { - removeTbTimers(); + removeGameTimer(TELEBLOCK); } } @@ -785,7 +763,7 @@ public class TimersPlugin extends Plugin if (widget != null && !widget.isSelfHidden()) { log.debug("Entered safe zone in PVP world, clearing Teleblock timer."); - removeTbTimers(); + removeGameTimer(TELEBLOCK); } } @@ -812,7 +790,7 @@ public class TimersPlugin extends Plugin } removeTzhaarTimer(); // will be readded by the wave message - removeTbTimers(); + removeGameTimer(TELEBLOCK); break; case LOGGED_IN: loggedInRace = true; @@ -1074,14 +1052,4 @@ public class TimersPlugin extends Plugin { infoBoxManager.removeIf(t -> t instanceof IndicatorIndicator && ((IndicatorIndicator) t).getIndicator() == indicator); } - - private void removeTbTimers() - { - removeGameTimer(FULLTB); - removeGameTimer(HALFTB); - removeGameTimer(DMM_FULLTB); - removeGameTimer(DMM_HALFTB); - removeGameTimer(MAGE_ARENA_FULLTB); - removeGameTimer(MAGE_ARENA_HALFTB); - } } diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/timers/TimersPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/timers/TimersPluginTest.java index bddcee697a..494db7bd9d 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/timers/TimersPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/timers/TimersPluginTest.java @@ -30,12 +30,10 @@ import com.google.inject.testing.fieldbinder.Bind; import com.google.inject.testing.fieldbinder.BoundFieldModule; import java.time.Duration; import java.time.Instant; -import java.util.EnumSet; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.InventoryID; import net.runelite.api.ItemContainer; -import net.runelite.api.WorldType; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.ItemContainerChanged; import net.runelite.client.game.ItemManager; @@ -65,11 +63,6 @@ import org.mockito.stubbing.Answer; @RunWith(MockitoJUnitRunner.class) public class TimersPluginTest { - private static final String DMM_HALF_TELEBLOCK_MESSAGE = "A Tele Block spell has been cast on you by Runelite. It will expire in 1 minute, 15 seconds."; - private static final String FULL_TELEBLOCK_MESSAGE = "A Tele Block spell has been cast on you by Runelite. It will expire in 5 minutes."; - private static final String HALF_TELEBLOCK_MESSAGE = "A Tele Block spell has been cast on you by Runelite. It will expire in 2 minutes, 30 seconds."; - private static final String TRANSPARENT_CHATBOX_FULL_TELEBLOCK_MESSAGE = "A Tele Block spell has been cast on you by Alexsuperfly. It will expire in 5 minutes."; - private static final String TRANSPARENT_CHATBOX_TELEBLOCK_REMOVED_MESSAGE = "Your Tele Block has been removed because you killed Alexsuperfly."; private static final int FIGHT_CAVES_REGION_ID = 9551; @Inject @@ -105,54 +98,56 @@ public class TimersPluginTest public void testHalfTeleblock() { when(timersConfig.showTeleblock()).thenReturn(true); - when(client.getWorldType()).thenReturn(EnumSet.of(WorldType.MEMBERS)); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", HALF_TELEBLOCK_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you by Runelite. It will expire in 2 minutes, 30 seconds.", "", 0); timersPlugin.onChatMessage(chatMessage); ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); verify(infoBoxManager).addInfoBox(captor.capture()); TimerTimer infoBox = (TimerTimer) captor.getValue(); - assertEquals(GameTimer.HALFTB, infoBox.getTimer()); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofSeconds(2 * 60 + 30), infoBox.getDuration()); } @Test public void testFullTeleblock() { when(timersConfig.showTeleblock()).thenReturn(true); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", FULL_TELEBLOCK_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you by Runelite. It will expire in 5 minutes.", "", 0); timersPlugin.onChatMessage(chatMessage); ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); verify(infoBoxManager).addInfoBox(captor.capture()); TimerTimer infoBox = (TimerTimer) captor.getValue(); - assertEquals(GameTimer.FULLTB, infoBox.getTimer()); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofMinutes(5), infoBox.getDuration()); } @Test public void testDmmHalfTb() { when(timersConfig.showTeleblock()).thenReturn(true); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", DMM_HALF_TELEBLOCK_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you by Runelite. It will expire in 1 minute, 15 seconds.", "", 0); timersPlugin.onChatMessage(chatMessage); ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); verify(infoBoxManager).addInfoBox(captor.capture()); TimerTimer infoBox = (TimerTimer) captor.getValue(); - assertEquals(GameTimer.DMM_HALFTB, infoBox.getTimer()); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofSeconds(60 + 15), infoBox.getDuration()); } @Test public void testDmmFullTb() { when(timersConfig.showTeleblock()).thenReturn(true); - when(client.getWorldType()).thenReturn(EnumSet.of(WorldType.DEADMAN)); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", HALF_TELEBLOCK_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you by Runelite. It will expire in 2 minutes, 30 seconds.", "", 0); timersPlugin.onChatMessage(chatMessage); ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); verify(infoBoxManager).addInfoBox(captor.capture()); TimerTimer infoBox = (TimerTimer) captor.getValue(); - assertEquals(GameTimer.DMM_FULLTB, infoBox.getTimer()); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofSeconds(60 * 2 + 30), infoBox.getDuration()); } @Test @@ -185,25 +180,54 @@ public class TimersPluginTest public void testTransparentChatboxTb() { when(timersConfig.showTeleblock()).thenReturn(true); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", TRANSPARENT_CHATBOX_FULL_TELEBLOCK_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you by Alexsuperfly. It will expire in 5 minutes.", "", 0); timersPlugin.onChatMessage(chatMessage); ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); verify(infoBoxManager).addInfoBox(captor.capture()); TimerTimer infoBox = (TimerTimer) captor.getValue(); - assertEquals(GameTimer.FULLTB, infoBox.getTimer()); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofMinutes(5), infoBox.getDuration()); } @Test public void testTransparentChatboxTbRemoved() { when(timersConfig.showTeleblock()).thenReturn(true); - ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", TRANSPARENT_CHATBOX_TELEBLOCK_REMOVED_MESSAGE, "", 0); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "Your Tele Block has been removed because you killed Alexsuperfly.", "", 0); timersPlugin.onChatMessage(chatMessage); verify(infoBoxManager, atLeastOnce()).removeIf(any()); } + @Test + public void testMageArena2TbFull() + { + when(timersConfig.showTeleblock()).thenReturn(true); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you. It will expire in 2 minutes.", "", 0); + timersPlugin.onChatMessage(chatMessage); + + ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); + verify(infoBoxManager).addInfoBox(captor.capture()); + TimerTimer infoBox = (TimerTimer) captor.getValue(); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofMinutes(2), infoBox.getDuration()); + } + + @Test + public void testMageArena2TbHalf() + { + when(timersConfig.showTeleblock()).thenReturn(true); + ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.SPAM, "", "A Tele Block spell has been cast on you. It will expire in 1 minute.", "", 0); + timersPlugin.onChatMessage(chatMessage); + + ArgumentCaptor captor = ArgumentCaptor.forClass(InfoBox.class); + verify(infoBoxManager).addInfoBox(captor.capture()); + TimerTimer infoBox = (TimerTimer) captor.getValue(); + assertEquals(GameTimer.TELEBLOCK, infoBox.getTimer()); + assertEquals(Duration.ofMinutes(1), infoBox.getDuration()); + } + @Test public void testStamina() { From 0e583c378faf8337bd6ca8cc2fc12e1940b0738d Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 10 Sep 2020 10:32:49 +0000 Subject: [PATCH 07/31] Update Item IDs to 2020-09-10-rev191 --- runelite-api/src/main/java/net/runelite/api/ItemID.java | 5 ++++- runelite-api/src/main/java/net/runelite/api/NullItemID.java | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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 4602e547ab..5834f3f735 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -6118,7 +6118,7 @@ public final class ItemID public static final int MAGICAL_CAPE_RACK = 9822; public static final int OAK_COSTUME_BOX = 9823; public static final int TEAK_COSTUME_BOX = 9824; - public static final int MAHOGANY_COS_BOX = 9825; + public static final int MAHOGANY_COSTUME_BOX = 9825; public static final int OAK_ARMOUR_CASE = 9826; public static final int TEAK_ARMOUR_CASE = 9827; public static final int MAHOGANY_ARMOUR_CASE = 9828; @@ -11469,5 +11469,8 @@ public final class ItemID public static final int WAXWOOD_LOG = 24938; public static final int WAXWOOD_PLANK = 24939; public static final int MARLOS_CRATE = 24940; + public static final int BP_OBJ = 24941; + public static final int REINFORCED_GOGGLES = 24942; + public static final int SOURHOG_FOOT = 24944; /* 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 1588dfd749..a41a2c6c30 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -13261,5 +13261,6 @@ public final class NullItemID public static final int NULL_24879 = 24879; public static final int NULL_24881 = 24881; public static final int NULL_24883 = 24883; + public static final int NULL_24943 = 24943; /* This file is automatically generated. Do not edit. */ } From 84110c84f0574cd961f3ce901e51a2c87addccfa Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 10 Sep 2020 10:32:50 +0000 Subject: [PATCH 08/31] Update Object IDs to 2020-09-10-rev191 --- .../java/net/runelite/api/NullObjectID.java | 28 +++++++++++++++++++ .../main/java/net/runelite/api/ObjectID.java | 20 +++++++++++++ 2 files changed, 48 insertions(+) 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 680e222b92..5416c14951 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -19691,5 +19691,33 @@ public final class NullObjectID public static final int NULL_40304 = 40304; public static final int NULL_40305 = 40305; public static final int NULL_40306 = 40306; + public static final int NULL_40322 = 40322; + public static final int NULL_40326 = 40326; + public static final int NULL_40327 = 40327; + public static final int NULL_40328 = 40328; + public static final int NULL_40329 = 40329; + public static final int NULL_40332 = 40332; + public static final int NULL_40333 = 40333; + public static final int NULL_40334 = 40334; + public static final int NULL_40335 = 40335; + public static final int NULL_40336 = 40336; + public static final int NULL_40337 = 40337; + public static final int NULL_40338 = 40338; + public static final int NULL_40339 = 40339; + public static final int NULL_40340 = 40340; + public static final int NULL_40341 = 40341; + public static final int NULL_40342 = 40342; + public static final int NULL_40343 = 40343; + public static final int NULL_40344 = 40344; + public static final int NULL_40345 = 40345; + public static final int NULL_40346 = 40346; + public static final int NULL_40347 = 40347; + public static final int NULL_40348 = 40348; + public static final int NULL_40349 = 40349; + public static final int NULL_40350 = 40350; + public static final int NULL_40351 = 40351; + public static final int NULL_40352 = 40352; + public static final int NULL_40353 = 40353; + public static final int NULL_40354 = 40354; /* 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 25b93a76f6..49d79afafc 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -20602,5 +20602,25 @@ public final class ObjectID public static final int DRAWERS_40282 = 40282; public static final int DRAWERS_40283 = 40283; public static final int BOXES_40284 = 40284; + public static final int NOTICE_BOARD_40307 = 40307; + public static final int STRANGE_HOLE_40308 = 40308; + public static final int STRANGE_HOLE_40309 = 40309; + public static final int CABBAGE_40310 = 40310; + public static final int POTATOES_40311 = 40311; + public static final int CARROT = 40312; + public static final int BROKEN_DEAD_TREE = 40313; + public static final int DAMAGED_CART = 40314; + public static final int FALLEN_TREE_40315 = 40315; + public static final int DEAD_SOURHOG = 40316; + public static final int DEAD_SOURHOG_40317 = 40317; + public static final int DEAD_SOURHOG_40318 = 40318; + public static final int DEAD_SOURHOG_40319 = 40319; + public static final int SKELETON_40320 = 40320; + public static final int SKELETON_40321 = 40321; + public static final int SCRAWLED_NOTE = 40323; + public static final int PILE_OF_ROPE_40324 = 40324; + public static final int DOOR_40325 = 40325; + public static final int ROPE_40330 = 40330; + public static final int BLOCKAGE_40331 = 40331; /* This file is automatically generated. Do not edit. */ } From 4d303fbd52dcea3a734ca8609b58b514182b2649 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 10 Sep 2020 10:32:50 +0000 Subject: [PATCH 09/31] Update NPC IDs to 2020-09-10-rev191 --- .../src/main/java/net/runelite/api/NpcID.java | 11 ++++++++++- .../src/main/java/net/runelite/api/NullNpcID.java | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 9118a406d4..c873061a0a 100644 --- a/runelite-api/src/main/java/net/runelite/api/NpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java @@ -3026,7 +3026,6 @@ public final class NpcID public static final int WIZARD_3232 = 3232; public static final int LEECH = 3233; public static final int FERAL_VAMPYRE_3234 = 3234; - public static final int SPIDER_3235 = 3235; public static final int MIST = 3236; public static final int FERAL_VAMPYRE_3237 = 3237; public static final int VAMPYRIC_HOUND = 3238; @@ -8817,5 +8816,15 @@ public final class NpcID public static final int OLD_MAN_YARLO = 10425; public static final int OLD_MAN_YARLO_10426 = 10426; public static final int OLD_MAN_YARLO_10427 = 10427; + public static final int SPRIA = 10432; + public static final int SPRIA_10433 = 10433; + public static final int SPRIA_10434 = 10434; + public static final int SOURHOG = 10435; + public static final int SOURHOG_10436 = 10436; + public static final int PIG_THING = 10437; + public static final int ROSIE_10438 = 10438; + public static final int SHEEPDOG_10439 = 10439; + public static final int SPIDER_10442 = 10442; + public static final int SPIDER_10443 = 10443; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java index bf0f8d0f2a..5773e6680e 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java @@ -1597,5 +1597,7 @@ public final class NullNpcID public static final int NULL_10429 = 10429; public static final int NULL_10430 = 10430; public static final int NULL_10431 = 10431; + public static final int NULL_10440 = 10440; + public static final int NULL_10441 = 10441; /* This file is automatically generated. Do not edit. */ } From d2b361dabb211a7b39dc3bac1cd095f26365616d Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 10 Sep 2020 10:32:53 +0000 Subject: [PATCH 10/31] Update Widget IDs to 2020-09-10-rev191 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6551e1799d..5463211ca9 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 @@ -907,7 +907,7 @@ public class WidgetID static class GenericScroll { - static final int TEXT = 6; + static final int TEXT = 7; } static class GauntletTimer From d9178bacb45a65e7b266d668789848a623d3ddf6 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 10 Sep 2020 12:31:45 -0400 Subject: [PATCH 11/31] quest: add A Porcine of Interest and Daddy's Home to quest enum --- runelite-api/src/main/java/net/runelite/api/Quest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Quest.java b/runelite-api/src/main/java/net/runelite/api/Quest.java index 89ff794cb7..4fb73936e3 100644 --- a/runelite-api/src/main/java/net/runelite/api/Quest.java +++ b/runelite-api/src/main/java/net/runelite/api/Quest.java @@ -178,6 +178,7 @@ public enum Quest SONG_OF_THE_ELVES(603, "Song of the Elves"), THE_FREMENNIK_EXILES(718, "The Fremennik Exiles"), SINS_OF_THE_FATHER(1276, "Sins of the Father"), + A_PORCINE_OF_INTEREST(1690, "A Porcine of Interest"), //Miniquests ENTER_THE_ABYSS(319, "Enter the Abyss"), @@ -192,7 +193,8 @@ public enum Quest LAIR_OF_TARN_RAZORLOR(328, "Lair of Tarn Razorlor"), FAMILY_PEST(329, "Family Pest"), THE_MAGE_ARENA_II(330, "The Mage Arena II"), - IN_SEARCH_OF_KNOWLEDGE(602, "In Search of Knowledge"); + IN_SEARCH_OF_KNOWLEDGE(602, "In Search of Knowledge"), + DADDYS_HOME(1688, "Daddy's Home"); @Getter private final int id; From 7754cf006c3623c347d0c41d3eb9c20022c832d6 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 10 Sep 2020 12:36:57 -0400 Subject: [PATCH 12/31] worldmap: add A Porcine of Interest quest start location --- .../net/runelite/client/plugins/worldmap/QuestStartLocation.java | 1 + 1 file changed, 1 insertion(+) 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 f12513b991..2fbb9ab84d 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 @@ -132,6 +132,7 @@ enum QuestStartLocation OLAFS_QUEST(Quest.OLAFS_QUEST, new WorldPoint(2723, 3729, 0)), ONE_SMALL_FAVOUR(Quest.ONE_SMALL_FAVOUR, new WorldPoint(2834, 2985, 0)), PLAGUE_CITY_SONG_OF_THE_ELVES(new Quest[]{Quest.PLAGUE_CITY, Quest.SONG_OF_THE_ELVES}, new WorldPoint(2567, 3334, 0)), + A_PORCINE_OF_INTEREST(Quest.A_PORCINE_OF_INTEREST, new WorldPoint(3085, 3251, 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)), From 5ef9896fdd54f2cd017c1988ff072aee2a7b88a0 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 10 Sep 2020 12:38:53 -0400 Subject: [PATCH 13/31] worldmap: add Sourhog Cave dungeon location --- .../net/runelite/client/plugins/worldmap/DungeonLocation.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java index 52f4b2b06b..c79b1a02a1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/DungeonLocation.java @@ -163,6 +163,7 @@ enum DungeonLocation SMOKE_DEVIL_BOSS("Thermonuclear Smoke Devil (boss)", new WorldPoint(2377, 9452, 0)), SMOKE_DUNGEON("Smoke Dungeon", new WorldPoint(3309, 2962, 0)), SOPHANEM("Sophanem Dungeon", new WorldPoint(3314, 2797, 0)), + SOURHOG_CAVE("Sourhog Cave", new WorldPoint(3149, 3347, 0)), STRONGHOLD_OF_SECURITY("Stronghold of Security", new WorldPoint(3080, 3420, 0)), STRONGHOLD_SLAYER("Stronghold Slayer Dungeon", new WorldPoint(2427, 3424, 0)), TAVERLEY("Taverley Dungeon", new WorldPoint(2883, 3397, 0)), From 4f7a51faceacf91d3a3543d21fc31fee1b2e6ec3 Mon Sep 17 00:00:00 2001 From: Illya Myshakov <35241874+IllyaMyshakov@users.noreply.github.com> Date: Fri, 11 Sep 2020 07:56:47 -0400 Subject: [PATCH 14/31] skillcalc: Add Blisterwood Logs firemaking and woodcutting calc (#12456) Co-authored-by: Illya Myshakov --- .../client/plugins/skillcalculator/skill_firemaking.json | 6 ++++++ .../client/plugins/skillcalculator/skill_woodcutting.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_firemaking.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_firemaking.json index 8bc6eaf7b4..37fe236443 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_firemaking.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_firemaking.json @@ -60,6 +60,12 @@ "name": "Yew Logs", "xp": 202.5 }, + { + "level": 62, + "icon": 24691, + "name": "Blisterwood Logs", + "xp": 96 + }, { "level": 75, "icon": 1513, diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_woodcutting.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_woodcutting.json index 29f1cf53c6..8a72413c99 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_woodcutting.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_woodcutting.json @@ -63,6 +63,12 @@ "name": "Yew Logs", "xp": 175 }, + { + "level": 62, + "icon": 24691, + "name": "Blisterwood Logs", + "xp": 76 + }, { "level": 65, "icon": 21626, From dc8382159980c3269a607b3afa169dbd1f82901f Mon Sep 17 00:00:00 2001 From: Max Weber Date: Wed, 9 Sep 2020 09:43:17 -0600 Subject: [PATCH 15/31] config: implicitly tag all hub plugins as pluginhub --- .../net/runelite/client/plugins/config/PluginListItem.java | 5 +++++ .../net/runelite/client/plugins/config/PluginListPanel.java | 1 + 2 files changed, 6 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java index 0569944009..f6c36315a9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java @@ -97,8 +97,13 @@ class PluginListItem extends JPanel ExternalPluginManifest mf = pluginConfig.getExternalPluginManifest(); if (mf != null) { + keywords.add("pluginhub"); keywords.add(mf.getInternalName()); } + else + { + keywords.add("plugin"); // we don't want searching plugin to only show hub plugins + } setLayout(new BorderLayout(3, 0)); setPreferredSize(new Dimension(PluginPanel.PANEL_WIDTH, 20)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java index c27cc2c800..feff6d644f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java @@ -81,6 +81,7 @@ class PluginListPanel extends PluginPanel "Item", "Minigame", "Notification", + "Plugin Hub", "Skilling", "XP" ); From 14147ce1c5646afdef72ddd78f97429b2595362a Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 11 Sep 2020 17:48:18 -0400 Subject: [PATCH 16/31] ge: include username in machine hash --- .../grandexchange/GrandExchangePlugin.java | 82 ++++++++++++------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java index ef944b4516..1d5b9d9b46 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grandexchange/GrandExchangePlugin.java @@ -38,6 +38,7 @@ import java.awt.Color; import java.awt.image.BufferedImage; import java.io.IOException; import java.net.NetworkInterface; +import java.net.SocketException; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; @@ -189,42 +190,14 @@ public class GrandExchangePlugin extends Plugin @Inject private GrandExchangeClient grandExchangeClient; private boolean loginBurstGeUpdates; - private static String machineUuid; @Inject private OSBGrandExchangeClient osbGrandExchangeClient; private boolean wasFuzzySearch; - static - { - try - { - Hasher hasher = Hashing.sha256().newHasher(); - Runtime runtime = Runtime.getRuntime(); - - hasher.putByte((byte) OSType.getOSType().ordinal()); - hasher.putByte((byte) runtime.availableProcessors()); - hasher.putUnencodedChars(System.getProperty("os.arch", "")); - hasher.putUnencodedChars(System.getProperty("os.version", "")); - hasher.putUnencodedChars(System.getProperty("user.name", "")); - Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); - while (networkInterfaces.hasMoreElements()) - { - NetworkInterface networkInterface = networkInterfaces.nextElement(); - byte[] hardwareAddress = networkInterface.getHardwareAddress(); - if (hardwareAddress != null) - { - hasher.putBytes(hardwareAddress); - } - } - machineUuid = hasher.hash().toString(); - } - catch (Exception ex) - { - log.warn("unable to generate machine id", ex); - } - } + private String machineUuid; + private String lastUsername; /** * Logic from {@link org.apache.commons.text.similarity.FuzzyScore} @@ -338,7 +311,6 @@ public class GrandExchangePlugin extends Plugin { grandExchangeClient.setUuid(null); } - grandExchangeClient.setMachineId(machineUuid); osbItem = -1; osbGrandExchangeResult = null; @@ -352,6 +324,7 @@ public class GrandExchangePlugin extends Plugin keyManager.unregisterKeyListener(inputListener); grandExchangeText = null; grandExchangeItem = null; + lastUsername = machineUuid = null; } @Subscribe @@ -564,6 +537,10 @@ public class GrandExchangePlugin extends Plugin panel.getOffersPanel().resetOffers(); loginBurstGeUpdates = true; } + else if (gameStateChanged.getGameState() == GameState.LOGGED_IN) + { + grandExchangeClient.setMachineId(getMachineUuid()); + } } @Subscribe @@ -942,4 +919,47 @@ public class GrandExchangePlugin extends Plugin + itemId; LinkBrowser.browse(url); } + + private String getMachineUuid() + { + String username = client.getUsername(); + if (lastUsername == username) + { + return machineUuid; + } + + lastUsername = username; + + try + { + Hasher hasher = Hashing.sha256().newHasher(); + Runtime runtime = Runtime.getRuntime(); + + hasher.putByte((byte) OSType.getOSType().ordinal()); + hasher.putByte((byte) runtime.availableProcessors()); + hasher.putUnencodedChars(System.getProperty("os.arch", "")); + hasher.putUnencodedChars(System.getProperty("os.version", "")); + hasher.putUnencodedChars(System.getProperty("user.name", "")); + + Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); + while (networkInterfaces.hasMoreElements()) + { + NetworkInterface networkInterface = networkInterfaces.nextElement(); + byte[] hardwareAddress = networkInterface.getHardwareAddress(); + if (hardwareAddress != null) + { + hasher.putBytes(hardwareAddress); + } + } + hasher.putUnencodedChars(username); + machineUuid = hasher.hash().toString(); + return machineUuid; + } + catch (SocketException ex) + { + log.debug("unable to generate machine id", ex); + machineUuid = null; + return null; + } + } } From 754fbf2b134dfb60ce671c5c72feab6b539aac78 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Sun, 13 Sep 2020 09:57:34 -0700 Subject: [PATCH 17/31] HotColdLocation: Center some location spots Center some hot-cold locations as reported and verified from the mega issue. Ref: runelite/runelite#9601 --- .../cluescrolls/clues/hotcold/HotColdLocation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java index 832c3fdf17..54feabc852 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java @@ -66,7 +66,7 @@ public enum HotColdLocation DESERT_GENIE(new WorldPoint(3359, 2912, 0), DESERT, "West of Nardah genie cave.", BRASSICAN_MAGE), DESERT_ALKHARID_MINE(new WorldPoint(3279, 3263, 0), DESERT, "West of Al Kharid mine.", BRASSICAN_MAGE), DESERT_MENAPHOS_GATE(new WorldPoint(3223, 2820, 0), DESERT, "North of Menaphos gate.", BRASSICAN_MAGE), - DESERT_BEDABIN_CAMP(new WorldPoint(3164, 3050, 0), DESERT, "Bedabin Camp, dig around the north tent.", BRASSICAN_MAGE), + DESERT_BEDABIN_CAMP(new WorldPoint(3161, 3047, 0), DESERT, "Bedabin Camp, near the north tent.", BRASSICAN_MAGE), DESERT_UZER(new WorldPoint(3432, 3105, 0), DESERT, "West of Uzer.", BRASSICAN_MAGE), DESERT_POLLNIVNEACH(new WorldPoint(3288, 2976, 0), DESERT, "West of Pollnivneach.", BRASSICAN_MAGE), DESERT_MTA(new WorldPoint(3347, 3295, 0), DESERT, "Next to Mage Training Arena.", BRASSICAN_MAGE), @@ -80,10 +80,10 @@ public enum HotColdLocation FELDIP_HILLS_SOUTH(new WorldPoint(2486, 3007, 0), FELDIP_HILLS, "South of Jiggig.", BRASSICAN_MAGE), FELDIP_HILLS_RED_CHIN(new WorldPoint(2530, 2901, 0), FELDIP_HILLS, "Outside the red chinchompa hunting ground entrance, south of the Hunting expert's hut.", BRASSICAN_MAGE), FELDIP_HILLS_SE(new WorldPoint(2569, 2918, 0), FELDIP_HILLS, "South-east of the ∩-shaped lake, near the Hunter icon.", BRASSICAN_MAGE), - FELDIP_HILLS_CW_BALLOON(new WorldPoint(2452, 3108, 0), FELDIP_HILLS, "Directly west of the Castle Wars balloon.", BRASSICAN_MAGE), + FELDIP_HILLS_CW_BALLOON(new WorldPoint(2451, 3112, 0), FELDIP_HILLS, "Directly west of the Castle Wars balloon.", BRASSICAN_MAGE), FREMENNIK_PROVINCE_MTN_CAMP(new WorldPoint(2800, 3669, 0), FREMENNIK_PROVINCE, "At the Mountain Camp.", BRASSICAN_MAGE), FREMENNIK_PROVINCE_RELLEKKA_HUNTER(new WorldPoint(2720, 3784, 0), FREMENNIK_PROVINCE, "At the Rellekka Hunter area, near the Hunter icon.", BRASSICAN_MAGE), - FREMENNIK_PROVINCE_KELGADRIM_ENTRANCE(new WorldPoint(2715, 3689, 0), FREMENNIK_PROVINCE, "West of the Keldagrim entrance mine.", BRASSICAN_MAGE), + FREMENNIK_PROVINCE_KELGADRIM_ENTRANCE(new WorldPoint(2711, 3689, 0), FREMENNIK_PROVINCE, "West of the Keldagrim entrance mine.", BRASSICAN_MAGE), FREMENNIK_PROVINCE_SW(new WorldPoint(2604, 3648, 0), FREMENNIK_PROVINCE, "Outside the fence in the south-western corner of Rellekka.", BRASSICAN_MAGE), FREMENNIK_PROVINCE_LIGHTHOUSE(new WorldPoint(2585, 3601, 0), FREMENNIK_PROVINCE, "South-east of the Lighthouse.", BRASSICAN_MAGE), FREMENNIK_PROVINCE_ETCETERIA_CASTLE(new WorldPoint(2617, 3862, 0), FREMENNIK_PROVINCE, "South-east of Etceteria's castle.", BRASSICAN_MAGE), @@ -127,7 +127,7 @@ public enum HotColdLocation MISTHALIN_GERTUDES(new WorldPoint(3154, 3421, 0), MISTHALIN, "North-east of Gertrude's house west of Varrock.", BRASSICAN_MAGE), MISTHALIN_DRAYNOR_BANK(new WorldPoint(3098, 3234, 0), MISTHALIN, "South of Draynor Village bank.", BRASSICAN_MAGE), MISTHALIN_LUMBER_YARD(new WorldPoint(3301, 3484, 0), MISTHALIN, "South of Lumber Yard, east of Assistant Serf.", BRASSICAN_MAGE), - MORYTANIA_BURGH_DE_ROTT(new WorldPoint(3545, 3253, 0), MORYTANIA, "In the north-east area of Burgh de Rott, by the reverse-L-shaped ruins.", BRASSICAN_MAGE), + MORYTANIA_BURGH_DE_ROTT(new WorldPoint(3546, 3252, 0), MORYTANIA, "In the north-east area of Burgh de Rott, by the reverse-L-shaped ruins.", BRASSICAN_MAGE), MORYTANIA_DARKMEYER(new WorldPoint(3604, 3326, 0), MORYTANIA, "Southwestern part of Darkmeyer.", BRASSICAN_MAGE), MORYTANIA_PORT_PHASMATYS(new WorldPoint(3611, 3485, 0), MORYTANIA, "West of Port Phasmatys, south-east of fairy ring.", BRASSICAN_MAGE), MORYTANIA_HOLLOWS(new WorldPoint(3499, 3421, 0), MORYTANIA, "Inside The Hollows, south of the bridge which was repaired in a quest.", BRASSICAN_MAGE), From 5a524471f8358e75405f787964391c986e529029 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 13 Sep 2020 13:43:50 -0400 Subject: [PATCH 18/31] mining plugin: track dense essence mining Mining dense essense doesn't have a chat message so this starts the mining session based on animation instead. Co-authored-by: chasertw123 --- .../client/plugins/mining/MiningOverlay.java | 3 ++- .../client/plugins/mining/MiningPlugin.java | 21 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) 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 d2ab1e63bd..82373418dd 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 @@ -28,6 +28,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import javax.inject.Inject; +import net.runelite.api.AnimationID; import net.runelite.api.Client; import net.runelite.api.MenuAction; import net.runelite.api.Skill; @@ -71,7 +72,7 @@ class MiningOverlay extends OverlayPanel } Pickaxe pickaxe = plugin.getPickaxe(); - if (pickaxe != null && pickaxe.matchesMiningAnimation(client.getLocalPlayer())) + if (pickaxe != null && (pickaxe.matchesMiningAnimation(client.getLocalPlayer()) || client.getLocalPlayer().getAnimation() == AnimationID.DENSE_ESSENCE_CHIPPING)) { panelComponent.getChildren().add(TitleComponent.builder() .text("Mining") 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 310ba66f7e..d8a3b8e2aa 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 @@ -34,6 +34,7 @@ import javax.annotation.Nullable; import javax.inject.Inject; import lombok.AccessLevel; import lombok.Getter; +import net.runelite.api.AnimationID; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.GameObject; @@ -176,10 +177,24 @@ public class MiningPlugin extends Plugin } int animId = local.getAnimation(); - Pickaxe pickaxe = Pickaxe.fromAnimation(animId); - if (pickaxe != null) + if (animId == AnimationID.DENSE_ESSENCE_CHIPPING) { - this.pickaxe = pickaxe; + // Can't use chat messages to start mining session on Dense Essence as they don't have a chat message when mined, + // so we track the session here instead. + if (session == null) + { + session = new MiningSession(); + } + + session.setLastMined(); + } + else + { + Pickaxe pickaxe = Pickaxe.fromAnimation(animId); + if (pickaxe != null) + { + this.pickaxe = pickaxe; + } } } From e4fe839efe5d9845fb9c57c2b3e45effabbac2ed Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Mon, 14 Sep 2020 17:09:23 -0700 Subject: [PATCH 19/31] EmoteClue: Fix Infernal max cape item ID Two infernal max cape items exist: one being the item which players can use, and another presumably being the item displayed in the dialog shown when combining a max cape and an infernal cape. `INFERNAL_MAX_CAPE` is the definition for the latter cape, and `INFERNAL_MAX_CAPE_21285` is the real item players would have. --- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java index 37453ba3df..a6d98189cf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java @@ -106,7 +106,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Cry in the Catherby Ranging shop. Bow before you talk to me. Equip blue gnome boots, a hard leather body and an unblessed silver sickle.", "Catherby", HICKTONS_ARCHERY_EMPORIUM, new WorldPoint(2823, 3443, 0), CRY, BOW, item(BLUE_BOOTS), item(HARDLEATHER_BODY), item(SILVER_SICKLE)), new EmoteClue("Cry on the shore of Catherby beach. Laugh before you talk to me, equip an adamant sq shield, a bone dagger and mithril platebody.", "Catherby", OUTSIDE_HARRYS_FISHING_SHOP_IN_CATHERBY, new WorldPoint(2852, 3429, 0), CRY, LAUGH, item(ADAMANT_SQ_SHIELD), item(BONE_DAGGER), item(MITHRIL_PLATEBODY)), new EmoteClue("Cry on top of the western tree in the Gnome Agility Arena. Indicate 'no' before you talk to me. Equip a steel kiteshield, ring of forging and green dragonhide chaps.", "Gnome Stronghold", GNOME_STRONGHOLD_BALANCING_ROPE, new WorldPoint(2473, 3420, 2), CRY, NO, item(STEEL_KITESHIELD), item(RING_OF_FORGING), item(GREEN_DHIDE_CHAPS)), - new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), DOUBLE_AGENT_141, CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_MAX_CAPE), item(INFERNAL_CAPE), item(INFERNAL_MAX_CAPE)), item(TOKTZXILUL)), + new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), DOUBLE_AGENT_141, CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_MAX_CAPE), item(INFERNAL_CAPE), item(INFERNAL_MAX_CAPE_21285)), item(TOKTZXILUL)), new EmoteClue("Cry in the Draynor Village jail. Jump for joy before you talk to me. Equip an adamant sword, a sapphire amulet and an adamant plateskirt.", "Draynor Village jail", OUTSIDE_DRAYNOR_VILLAGE_JAIL, new WorldPoint(3128, 3245, 0), CRY, JUMP_FOR_JOY, item(ADAMANT_SWORD), item(SAPPHIRE_AMULET), item(ADAMANT_PLATESKIRT)), new EmoteClue("Dance at the crossroads north of Draynor. Equip an iron chain body, a sapphire ring and a longbow.", "Draynor Village", CROSSROADS_NORTH_OF_DRAYNOR_VILLAGE, new WorldPoint(3109, 3294, 0), DANCE, item(IRON_CHAINBODY), item(SAPPHIRE_RING), item(LONGBOW)), new EmoteClue("Dance in the Party Room. Equip a steel full helmet, steel platebody and an iron plateskirt.", "Falador Party Room", OUTSIDE_THE_FALADOR_PARTY_ROOM, new WorldPoint(3045, 3376, 0), DANCE, item(STEEL_FULL_HELM), item(STEEL_PLATEBODY), item(IRON_PLATESKIRT)), From 8d65dcb1eacc0b6a2ebb4a88f41b5474d3302408 Mon Sep 17 00:00:00 2001 From: MarbleTurtle <60723971+MarbleTurtle@users.noreply.github.com> Date: Thu, 13 Aug 2020 21:39:58 -0700 Subject: [PATCH 20/31] clues: Support items locked with Trouver parchment --- .../client/plugins/cluescrolls/clues/EmoteClue.java | 6 +++--- .../client/plugins/cluescrolls/clues/FaloTheBardClue.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java index a6d98189cf..924f55f4fc 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java @@ -106,7 +106,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Cry in the Catherby Ranging shop. Bow before you talk to me. Equip blue gnome boots, a hard leather body and an unblessed silver sickle.", "Catherby", HICKTONS_ARCHERY_EMPORIUM, new WorldPoint(2823, 3443, 0), CRY, BOW, item(BLUE_BOOTS), item(HARDLEATHER_BODY), item(SILVER_SICKLE)), new EmoteClue("Cry on the shore of Catherby beach. Laugh before you talk to me, equip an adamant sq shield, a bone dagger and mithril platebody.", "Catherby", OUTSIDE_HARRYS_FISHING_SHOP_IN_CATHERBY, new WorldPoint(2852, 3429, 0), CRY, LAUGH, item(ADAMANT_SQ_SHIELD), item(BONE_DAGGER), item(MITHRIL_PLATEBODY)), new EmoteClue("Cry on top of the western tree in the Gnome Agility Arena. Indicate 'no' before you talk to me. Equip a steel kiteshield, ring of forging and green dragonhide chaps.", "Gnome Stronghold", GNOME_STRONGHOLD_BALANCING_ROPE, new WorldPoint(2473, 3420, 2), CRY, NO, item(STEEL_KITESHIELD), item(RING_OF_FORGING), item(GREEN_DHIDE_CHAPS)), - new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), DOUBLE_AGENT_141, CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_MAX_CAPE), item(INFERNAL_CAPE), item(INFERNAL_MAX_CAPE_21285)), item(TOKTZXILUL)), + new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), DOUBLE_AGENT_141, CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_CAPE_L), item(FIRE_MAX_CAPE), item(FIRE_MAX_CAPE_L), item(INFERNAL_CAPE), item(INFERNAL_CAPE_L), item(INFERNAL_MAX_CAPE_21285), item(INFERNAL_MAX_CAPE_L)), item(TOKTZXILUL)), new EmoteClue("Cry in the Draynor Village jail. Jump for joy before you talk to me. Equip an adamant sword, a sapphire amulet and an adamant plateskirt.", "Draynor Village jail", OUTSIDE_DRAYNOR_VILLAGE_JAIL, new WorldPoint(3128, 3245, 0), CRY, JUMP_FOR_JOY, item(ADAMANT_SWORD), item(SAPPHIRE_AMULET), item(ADAMANT_PLATESKIRT)), new EmoteClue("Dance at the crossroads north of Draynor. Equip an iron chain body, a sapphire ring and a longbow.", "Draynor Village", CROSSROADS_NORTH_OF_DRAYNOR_VILLAGE, new WorldPoint(3109, 3294, 0), DANCE, item(IRON_CHAINBODY), item(SAPPHIRE_RING), item(LONGBOW)), new EmoteClue("Dance in the Party Room. Equip a steel full helmet, steel platebody and an iron plateskirt.", "Falador Party Room", OUTSIDE_THE_FALADOR_PARTY_ROOM, new WorldPoint(3045, 3376, 0), DANCE, item(STEEL_FULL_HELM), item(STEEL_PLATEBODY), item(IRON_PLATESKIRT)), @@ -139,8 +139,8 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Panic by the pilot on White Wolf Mountain. Beware of double agents! Equip mithril platelegs, a ring of life and a rune axe.", "White Wolf Mountain", GNOME_GLIDER_ON_WHITE_WOLF_MOUNTAIN, new WorldPoint(2847, 3499, 0), DOUBLE_AGENT_108, PANIC, item(MITHRIL_PLATELEGS), item(RING_OF_LIFE), item(RUNE_AXE)), new EmoteClue("Panic by the big egg where no one dare goes and the ground is burnt. Beware of double agents! Equip a dragon med helm, a TokTz-Ket-Xil, a brine sabre, rune platebody and an uncharged amulet of glory.", "Lava dragon isle", SOUTHEAST_CORNER_OF_LAVA_DRAGON_ISLE, new WorldPoint(3227, 3831, 0), DOUBLE_AGENT_141, PANIC, item(DRAGON_MED_HELM), item(TOKTZKETXIL), item(BRINE_SABRE), item(RUNE_PLATEBODY), any("Uncharged Amulet of glory", item(AMULET_OF_GLORY))), new EmoteClue("Panic at the area flowers meet snow. Equip Blue D'hide vambraces, a dragon spear and a rune plateskirt.", "Trollweiss mountain", HALFWAY_DOWN_TROLLWEISS_MOUNTAIN, new WorldPoint(2776, 3781, 0), PANIC, item(BLUE_DHIDE_VAMBRACES), item(DRAGON_SPEAR), item(RUNE_PLATESKIRT), item(SLED_4084)), - new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), - new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(AVERNIC_DEFENDER)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), + new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), + new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))), new EmoteClue("Blow a raspberry at the monkey cage in Ardougne Zoo. Equip a studded leather body, bronze platelegs and a normal staff with no orb.", "Ardougne Zoo", NEAR_THE_PARROTS_IN_ARDOUGNE_ZOO, new WorldPoint(2607, 3282, 0), RASPBERRY, item(STUDDED_BODY), item(BRONZE_PLATELEGS), item(STAFF)), new EmoteClue("Blow raspberries outside the entrance to Keep Le Faye. Equip a coif, an iron platebody and leather gloves.", "Keep Le Faye", OUTSIDE_KEEP_LE_FAYE, new WorldPoint(2757, 3401, 0), RASPBERRY, item(COIF), item(IRON_PLATEBODY), item(LEATHER_GLOVES)), new EmoteClue("Blow a raspberry in the Fishing Guild bank. Beware of double agents! Equip an elemental shield, blue dragonhide chaps and a rune warhammer.", "Fishing Guild", FISHING_GUILD_BANK, new WorldPoint(2588, 3419, 0), DOUBLE_AGENT_108, RASPBERRY, item(ELEMENTAL_SHIELD), item(BLUE_DHIDE_CHAPS), item(RUNE_WARHAMMER)), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java index a517bd06b0..77910ab61d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/FaloTheBardClue.java @@ -58,13 +58,13 @@ public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcCl new FaloTheBardClue("A molten beast with fiery breath, you acquire these with its death.", item(LAVA_DRAGON_BONES)), new FaloTheBardClue("A shiny helmet of flight, to obtain this with melee, struggle you might.", item(ARMADYL_HELMET)), // The wiki doesn't specify whether the trimmed dragon defender will work so I've assumed that it doesn't - new FaloTheBardClue("A sword held in the other hand, red its colour, Cyclops strength you must withstand.", any("Dragon or Avernic Defender", item(DRAGON_DEFENDER), item(AVERNIC_DEFENDER))), + new FaloTheBardClue("A sword held in the other hand, red its colour, Cyclops strength you must withstand.", any("Dragon or Avernic Defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L))), new FaloTheBardClue("A token used to kill mythical beasts, in hopes of a blade or just for an xp feast.", item(WARRIOR_GUILD_TOKEN)), new FaloTheBardClue("Green is my favourite, mature ale I do love, this takes your herblore above.", item(GREENMANS_ALEM)), new FaloTheBardClue("It can hold down a boat or crush a goat, this object, you see, is quite heavy.", item(BARRELCHEST_ANCHOR)), new FaloTheBardClue("It comes from the ground, underneath the snowy plain. Trolls aplenty, with what looks like a mane.", item(BASALT)), new FaloTheBardClue("No attack to wield, only strength is required, made of obsidian, but with no room for a shield.", item(TZHAARKETOM)), - new FaloTheBardClue("Penance healers runners and more, obtaining this body often gives much deplore.", item(FIGHTER_TORSO)), + new FaloTheBardClue("Penance healers runners and more, obtaining this body often gives much deplore.", any("Fighter Torso", item(FIGHTER_TORSO), item(FIGHTER_TORSO_L))), new FaloTheBardClue("Strangely found in a chest, many believe these gloves are the best.", item(BARROWS_GLOVES)), new FaloTheBardClue("These gloves of white won't help you fight, but aid in cooking, they just might.", item(COOKING_GAUNTLETS)), new FaloTheBardClue("They come from some time ago, from a land unto the east. Fossilised they have become, this small and gentle beast.", item(NUMULITE)), From 666b94dd1168ddbd1205791c0c9d080f28641d65 Mon Sep 17 00:00:00 2001 From: arthur798 <54174184+arthur798@users.noreply.github.com> Date: Tue, 15 Sep 2020 03:09:42 +0100 Subject: [PATCH 21/31] skillcalculator: Add Hallowed sepulchre floors to agility calculator (#12414) --- .../skillcalculator/skill_agility.json | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_agility.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_agility.json index 197fefeba1..495dd19453 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_agility.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_agility.json @@ -78,6 +78,12 @@ "name": "Wilderness Agility Course", "xp": 571 }, + { + "level": 52, + "icon": 24736, + "name": "Hallowed Sepulchre Floor 1", + "xp": 575 + }, { "level": 60, "icon": 11849, @@ -90,12 +96,24 @@ "name": "Werewolf Agility Course", "xp": 730 }, + { + "level": 62, + "icon": 24736, + "name": "Hallowed Sepulchre Floor 2", + "xp": 925 + }, { "level": 70, "icon": 11849, "name": "Pollnivneach Rooftop", "xp": 890 }, + { + "level": 72, + "icon": 24736, + "name": "Hallowed Sepulchre Floor 3", + "xp": 1500 + }, { "level": 75, "icon": 23962, @@ -108,11 +126,23 @@ "name": "Rellekka Rooftop", "xp": 780 }, + { + "level": 82, + "icon": 24736, + "name": "Hallowed Sepulchre Floor 4", + "xp": 2700 + }, { "level": 90, "icon": 11849, "name": "Ardougne Rooftop", "xp": 793 + }, + { + "level": 92, + "icon": 24736, + "name": "Hallowed Sepulchre Floor 5", + "xp": 6000 } ] -} \ No newline at end of file +} From 49482e3784af57c9154da191b82f939b41d8e7fa Mon Sep 17 00:00:00 2001 From: data-dependent <62915261+data-dependent@users.noreply.github.com> Date: Mon, 14 Sep 2020 22:23:31 -0400 Subject: [PATCH 22/31] mining: Fix gem rock respawn time (#12481) --- .../src/main/java/net/runelite/client/plugins/mining/Rock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1ee5ccf736..4f8cf9b32f 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 @@ -92,7 +92,7 @@ enum Rock ORE_VEIN(Duration.of(MiningRocksOverlay.ORE_VEIN_MAX_RESPAWN_TIME, GAME_TICKS), 150), AMETHYST(Duration.of(125, GAME_TICKS), 120), ASH_VEIN(Duration.of(50, GAME_TICKS), 0, ASH_PILE), - GEM_ROCK(Duration.of(100, GAME_TICKS), 0, ROCKS_11380, ROCKS_11381), + GEM_ROCK(Duration.of(99, GAME_TICKS), 0, ROCKS_11380, ROCKS_11381), URT_SALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33254), EFH_SALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33255), TE_SALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33256), From aa2bb76cccc64f49374103ba9d9085832a7ac1c3 Mon Sep 17 00:00:00 2001 From: Sean Patiag Date: Tue, 15 Sep 2020 04:36:21 -0700 Subject: [PATCH 23/31] achievementdiary: Fix Western Provinces quest requirement --- .../achievementdiary/diaries/WesternDiaryRequirement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java index 133ef6903a..6a182feb51 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java @@ -65,7 +65,7 @@ public class WesternDiaryRequirement extends GenericDiaryRequirement add("Chop and burn some teak logs on Ape Atoll.", new SkillRequirement(Skill.WOODCUTTING, 35), new SkillRequirement(Skill.FIREMAKING, 35), - new QuestRequirement(Quest.MONKEY_MADNESS_I)); + new QuestRequirement(Quest.MONKEY_MADNESS_I, true)); add("Complete an intermediate game of Pest Control.", new CombatLevelRequirement(70)); add("Travel to the Feldip Hills by Gnome Glider.", From 197c667edfb9ffc1500bb6e721eb0d0e4194dc3e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 15 Sep 2020 18:58:11 -0400 Subject: [PATCH 24/31] item manager: fix item outlines to more accurately fit model Not sure where these original arguments come from, but it was incorrectly noting the items and then attempting to adjust zoom to account for that, which makes most item outlines slightly off --- .../src/main/java/net/runelite/client/game/ItemManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9fcd1b4c98..0a26e0f584 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 @@ -482,7 +482,7 @@ public class ItemManager */ private BufferedImage loadItemOutline(final int itemId, final int itemQuantity, final Color outlineColor) { - final SpritePixels itemSprite = client.createItemSprite(itemId, itemQuantity, 1, 0, 0, true, 710); + final SpritePixels itemSprite = client.createItemSprite(itemId, itemQuantity, 1, 0, 0, false, Constants.CLIENT_DEFAULT_ZOOM); return itemSprite.toBufferedOutline(outlineColor); } From 6750557ebac30a74ff102059ec2dde6a627405c7 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Sun, 16 Aug 2020 01:43:59 -0400 Subject: [PATCH 25/31] discord: update config names and descriptions --- .../client/plugins/discord/DiscordConfig.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java index 682d8c472c..aa2cf79519 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java @@ -57,8 +57,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showSkillActivity", - name = "Show activity while skilling", - description = "Configures if your activity while training skills should be shown.", + name = "Skilling", + description = "Show your activity while training skills", position = 3 ) default boolean showSkillingActivity() @@ -68,8 +68,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showBossActivity", - name = "Show activity at bosses", - description = "Configures if your activity at bosses should be shown.", + name = "Bosses", + description = "Show your activity and location while at bosses", position = 4 ) default boolean showBossActivity() @@ -79,8 +79,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showCityActivity", - name = "Show activity at cities", - description = "Configures if your activity at cities should be shown.", + name = "Cities", + description = "Show your activity and location while in cities", position = 5 ) default boolean showCityActivity() @@ -90,8 +90,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showDungeonActivity", - name = "Show activity at dungeons", - description = "Configures if your activity at dungeons should be shown.", + name = "Dungeons", + description = "Show your activity and location while in dungeons", position = 6 ) default boolean showDungeonActivity() @@ -101,8 +101,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showMinigameActivity", - name = "Show activity at minigames", - description = "Configures if your activity at minigames should be shown.", + name = "Minigames", + description = "Show your activity and location while in minigames", position = 7 ) default boolean showMinigameActivity() @@ -112,8 +112,8 @@ public interface DiscordConfig extends Config @ConfigItem( keyName = "showRaidingActivity", - name = "Show activity at raids", - description = "Configures if your activity at raids should be shown.", + name = "Raids", + description = "Show your activity and location while in Raids", position = 8 ) default boolean showRaidingActivity() From dd64d46a4d7b76252c3b750c2692d207e9605219 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Wed, 16 Sep 2020 10:31:17 +0000 Subject: [PATCH 26/31] Update Item IDs to 2020-09-16-rev191 --- runelite-api/src/main/java/net/runelite/api/NullItemID.java | 1 + 1 file changed, 1 insertion(+) 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 a41a2c6c30..aba4e37dc2 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -13262,5 +13262,6 @@ public final class NullItemID public static final int NULL_24881 = 24881; public static final int NULL_24883 = 24883; public static final int NULL_24943 = 24943; + public static final int NULL_24945 = 24945; /* This file is automatically generated. Do not edit. */ } From 40374c258b9fc68dd314f3e24104abc86548fb50 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Wed, 16 Sep 2020 10:31:18 +0000 Subject: [PATCH 27/31] Update Object IDs to 2020-09-16-rev191 --- runelite-api/src/main/java/net/runelite/api/ObjectID.java | 2 ++ 1 file changed, 2 insertions(+) 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 49d79afafc..7073e724e2 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -20622,5 +20622,7 @@ public final class ObjectID public static final int DOOR_40325 = 40325; public static final int ROPE_40330 = 40330; public static final int BLOCKAGE_40331 = 40331; + public static final int CRUMBLING_WALL_40355 = 40355; + public static final int ROCKS_40356 = 40356; /* This file is automatically generated. Do not edit. */ } From 5d30ffd813cd65b8cb24eb0efcb29d87525a9fbe Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Sun, 16 Aug 2020 01:36:30 -0400 Subject: [PATCH 28/31] discord: add Region AreaType --- .../client/plugins/discord/DiscordAreaType.java | 3 ++- .../client/plugins/discord/DiscordConfig.java | 11 +++++++++++ .../client/plugins/discord/DiscordPlugin.java | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordAreaType.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordAreaType.java index b18169f88e..743a04d6d3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordAreaType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordAreaType.java @@ -30,5 +30,6 @@ enum DiscordAreaType CITIES, DUNGEONS, MINIGAMES, - RAIDS + RAIDS, + REGIONS } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java index aa2cf79519..62b04c7e97 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordConfig.java @@ -120,4 +120,15 @@ public interface DiscordConfig extends Config { return true; } + + @ConfigItem( + keyName = "showRegionsActivity", + name = "Regions", + description = "Show your activity and location while in other regions", + position = 9 + ) + default boolean showRegionsActivity() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java index 37f92f9cb6..3b86dea2fe 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordPlugin.java @@ -436,6 +436,7 @@ public class DiscordPlugin extends Plugin case CITIES: return config.showCityActivity(); case DUNGEONS: return config.showDungeonActivity(); case MINIGAMES: return config.showMinigameActivity(); + case REGIONS: return config.showRegionsActivity(); } return false; From f7ead24611e7ff01183fa4a3bc62639519c7775b Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Sat, 15 Aug 2020 15:25:28 -0400 Subject: [PATCH 29/31] discord: add additional mapped regions This commit also fixes some typos in existing entries and changes some entries' area types from `CITIES` to `REGIONS` where appropriate. --- .../plugins/discord/DiscordGameEventType.java | 240 ++++++++++++++---- 1 file changed, 194 insertions(+), 46 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java index b78920f666..46a484d312 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2018, Tomas Slusny * Copyright (c) 2018, PandahRS + * Copyright (c) 2020, Brooklyn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,106 +74,119 @@ enum DiscordGameEventType BOSS_ABYSSAL_SIRE("Abyssal Sire", DiscordAreaType.BOSSES, 11851, 11850, 12363, 12362), BOSS_CERBERUS("Cerberus", DiscordAreaType.BOSSES, 4883, 5140, 5395), BOSS_COMMANDER_ZILYANA("Commander Zilyana", DiscordAreaType.BOSSES, 11602), + BOSS_CORP("Corporeal Beast", DiscordAreaType.BOSSES, 11842, 11844), BOSS_DKS("Dagannoth Kings", DiscordAreaType.BOSSES, 11588, 11589), BOSS_GENERAL_GRAARDOR("General Graardor", DiscordAreaType.BOSSES, 11347), BOSS_GIANT_MOLE("Giant Mole", DiscordAreaType.BOSSES, 6993, 6992), BOSS_GROTESQUE_GUARDIANS("Grotesque Guardians", DiscordAreaType.BOSSES, 6727), + BOSS_HESPORI("Hespori", DiscordAreaType.BOSSES, 5021), BOSS_HYDRA("Alchemical Hydra", DiscordAreaType.BOSSES, 5536), BOSS_KQ("Kalphite Queen", DiscordAreaType.BOSSES, 13972), BOSS_KRAKEN("Kraken", DiscordAreaType.BOSSES, 9116), BOSS_KREEARRA("Kree'arra", DiscordAreaType.BOSSES, 11346), BOSS_KRIL_TSUTSAROTH("K'ril Tsutsaroth", DiscordAreaType.BOSSES, 11603), + BOSS_NIGHTMARE("Nightmare of Ashihama", DiscordAreaType.BOSSES, 15515), + BOSS_SARACHNIS("Sarachnis", DiscordAreaType.BOSSES, 7322), BOSS_SKOTIZO("Skotizo", DiscordAreaType.BOSSES, 6810), BOSS_SMOKE_DEVIL("Thermonuclear smoke devil", DiscordAreaType.BOSSES, 9363, 9619), BOSS_VORKATH("Vorkath", DiscordAreaType.BOSSES, 9023), BOSS_WINTERTODT("Wintertodt", DiscordAreaType.BOSSES, 6462), BOSS_ZALCANO("Zalcano", DiscordAreaType.BOSSES, 12126), BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007), - BOSS_NIGHTMARE("Nightmare of Ashihama", DiscordAreaType.BOSSES, 15515), // Cities CITY_AL_KHARID("Al Kharid" , DiscordAreaType.CITIES, 13105, 13106), - CITY_APE_ATOLL("Ape Atoll" , DiscordAreaType.CITIES, 10795, 11051, 10974, 11050), - CITY_ARCEUUS_HOUSE("Arceuus" , DiscordAreaType.CITIES, 6459, 6715, 6458, 6714), - CITY_ARDOUGNE("Ardougne" , DiscordAreaType.CITIES, 10548, 10547, 10292, 10291, 10036, 10035, 9780, 9779), + CITY_ARCEUUS_HOUSE("Arceuus" , DiscordAreaType.CITIES, 6458, 6459, 6460, 6714, 6715), + CITY_ARDOUGNE("Ardougne" , DiscordAreaType.CITIES, 9779, 9780, 10035, 10036, 10291, 10292, 10547, 10548), + CITY_BANDIT_CAMP("Bandit Camp" , DiscordAreaType.CITIES, 12590), + CITY_BARBARIAN_OUTPOST("Barbarian Outpost", DiscordAreaType.CITIES, 10039), CITY_BARBARIAN_VILLAGE("Barbarian Village" , DiscordAreaType.CITIES, 12341), - CITY_BANDIT_CAMP("Bandit Camp" , DiscordAreaType.CITIES, 12591), - CITY_BEDABIN_CAMP("Bedabin Camp" , DiscordAreaType.CITIES, 12590), + CITY_BEDABIN_CAMP("Bedabin Camp" , DiscordAreaType.CITIES, 12591), CITY_BRIMHAVEN("Brimhaven" , DiscordAreaType.CITIES, 11057, 11058), CITY_BURGH_DE_ROTT("Burgh de Rott" , DiscordAreaType.CITIES, 13874, 13873, 14130, 14129), CITY_BURTHORPE("Burthorpe" , DiscordAreaType.CITIES, 11319, 11575), CITY_CANIFIS("Canifis" , DiscordAreaType.CITIES, 13878), CITY_CATHERBY("Catherby" , DiscordAreaType.CITIES, 11317, 11318, 11061), - CITY_CORSAIR_CAVE("Corsair Cove" , DiscordAreaType.CITIES, 10028, 10284), - CITY_DARKMEYER("Darkmeyer", DiscordAreaType.CITIES, 14388), + CITY_CORSAIR_COVE("Corsair Cove" , DiscordAreaType.CITIES, 10028, 10284), + CITY_DARKMEYER("Darkmeyer", DiscordAreaType.CITIES, 14388, 14644), CITY_DORGESH_KAAN("Dorgesh-Kaan" , DiscordAreaType.CITIES, 10835, 10834), - CITY_DRAYNOR("Draynor" , DiscordAreaType.CITIES, 12338), + CITY_DRAYNOR("Draynor" , DiscordAreaType.CITIES, 12338, 12339), CITY_EDGEVILLE("Edgeville" , DiscordAreaType.CITIES, 12342), CITY_ENTRANA("Entrana" , DiscordAreaType.CITIES, 11060, 11316), - CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084), - CITY_GOBLIN_VILLAGE("Goblin Village" , DiscordAreaType.CITIES, 11830), + CITY_ETCETERIA("Etceteria", DiscordAreaType.CITIES, 10300), + CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11827, 12084), CITY_GUTANOTH("Gu'Tanoth" , DiscordAreaType.CITIES, 10031), CITY_GWENITH("Gwenith", DiscordAreaType.CITIES, 8757), - CITY_HOSIDIUS_HOUSE("Hosidius" , DiscordAreaType.CITIES, 6710, 6711, 6712, 6713, 6455, 6456, 6965, 6966, 6967, 6968, 7221, 7223, 7224, 7478, 7479), - CITY_JATISZO("Jatizso" , DiscordAreaType.CITIES, 9531), - CITY_JIGGIG("Jiggig" , DiscordAreaType.CITIES, 9775), - CITY_KARAMJA("Karamja" , DiscordAreaType.CITIES, 11569, 11568, 11567, 11566, 11313, 11312, 11311), + CITY_HOSIDIUS_HOUSE("Hosidius" , DiscordAreaType.CITIES, 6710, 6711, 6712, 6455, 6456, 6966, 6967, 6968, 7221, 7223, 7224, 7478, 7479), + CITY_JATIZSO("Jatizso" , DiscordAreaType.CITIES, 9531), CITY_KELDAGRIM("Keldagrim" , DiscordAreaType.CITIES, 11423, 11422, 11679, 11678), + CITY_LANDS_END("Land's End", DiscordAreaType.CITIES, 5941), CITY_LLETYA("Lletya" , DiscordAreaType.CITIES, 9265), - CITY_LOVAKENGJ_HOUSE("Lovakengj" , DiscordAreaType.CITIES, 5692, 5948, 5691, 5947, 6203, 6202, 5690, 5946), + CITY_LOVAKENGJ_HOUSE("Lovakengj" , DiscordAreaType.CITIES, 5692, 5691, 5947, 6203, 6202, 5690, 5946), CITY_LUMBRIDGE("Lumbridge" , DiscordAreaType.CITIES, 12850), CITY_LUNAR_ISLE("Lunar Isle" , DiscordAreaType.CITIES, 8253, 8252, 8509, 8508), + CITY_MARIM("Marim", DiscordAreaType.REGIONS, 11051), CITY_MEIYERDITCH("Meiyerditch" , DiscordAreaType.CITIES, 14132, 14387, 14386, 14385), - CITY_MISCELLANIA("Miscellania" , DiscordAreaType.CITIES, 10044, 10300), - CITY_MOS_LE_HARMLESS("Mos Le'Harmless" , DiscordAreaType.CITIES, 14638), + CITY_MISCELLANIA("Miscellania" , DiscordAreaType.CITIES, 10044), + CITY_MOR_UL_REK("Mor Ul Rek" , DiscordAreaType.CITIES, 9808, 9807, 10064, 10063), CITY_MORTTON("Mort'ton" , DiscordAreaType.CITIES, 13875), - CITY_MOR_UI_REK("Mor UI Rek" , DiscordAreaType.CITIES, 9808, 9807, 10064, 10063), + CITY_MOS_LE_HARMLESS("Mos Le'Harmless" , DiscordAreaType.CITIES, 14638, 14639, 14894, 14895, 15151, 15406, 15407), CITY_MOUNT_KARUULM("Mount Karuulm", DiscordAreaType.CITIES, 5179, 4923, 5180), + CITY_MOUNTAIN_CAMP("Mountain Camp", DiscordAreaType.CITIES, 11065), CITY_MYNYDD("Mynydd", DiscordAreaType.CITIES, 8501), CITY_NARDAH("Nardah" , DiscordAreaType.CITIES, 13613), CITY_NEITIZNOT("Neitiznot" , DiscordAreaType.CITIES, 9275), + CITY_PISCARILIUS_HOUSE("Port Piscarilius" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226), CITY_PISCATORIS("Piscatoris" , DiscordAreaType.CITIES, 9273), CITY_POLLNIVNEACH("Pollnivneach" , DiscordAreaType.CITIES, 13358), CITY_PORT_KHAZARD("Port Khazard" , DiscordAreaType.CITIES, 10545), CITY_PORT_PHASMATYS("Port Phasmatys" , DiscordAreaType.CITIES, 14646), - CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12082), - CITY_PISCARILIUS_HOUSE("Port Piscarilius" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226), + CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12081, 12082), CITY_PRIFDDINAS("Prifddinas", DiscordAreaType.CITIES, 8499, 8500, 8755, 8756, 9011, 9012, 9013, 12894, 12895, 13150, 13151), - CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10553), + CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10297, 10553), CITY_RIMMINGTON("Rimmington" , DiscordAreaType.CITIES, 11826, 11570), CITY_SEERS_VILLAGE("Seers' Village" , DiscordAreaType.CITIES, 10806), - CITY_SHAYZIEN_HOUSE("Shayzien" , DiscordAreaType.CITIES, 5944, 5943, 6200, 6199, 5688), + CITY_SHAYZIEN_HOUSE("Shayzien" , DiscordAreaType.CITIES, 5944, 5943, 6200, 6199, 5686, 5687, 5688, 5689, 5945), CITY_SHILO_VILLAGE("Shilo Village" , DiscordAreaType.CITIES, 11310), + CITY_SLEPE("Slepe", DiscordAreaType.CITIES, 14643, 14899, 14900, 14901), CITY_SOPHANEM("Sophanem" , DiscordAreaType.CITIES, 13099), CITY_TAI_BWO_WANNAI("Tai Bwo Wannai" , DiscordAreaType.CITIES, 11056, 11055), CITY_TAVERLEY("Taverley" , DiscordAreaType.CITIES, 11574, 11573), - CITY_TREE_GNOME_STRONGHOLD("Tree Gnome Stronghold" , DiscordAreaType.CITIES, 9782, 9781), + CITY_TREE_GNOME_STRONGHOLD("Tree Gnome Stronghold" , DiscordAreaType.CITIES, 9525, 9526, 9782, 9781), CITY_TREE_GNOME_VILLAGE("Tree Gnome Village" , DiscordAreaType.CITIES, 10033), - CITY_TROLL_STRONGHOLD("Troll Stronghold" , DiscordAreaType.CITIES, 11321), - CITY_TYRAS_CAMP("Tyras Camp" , DiscordAreaType.CITIES, 8753, 8752), + CITY_TROLL_STRONGHOLD("Troll Stronghold" , DiscordAreaType.CITIES, 11321, 11421), CITY_UZER("Uzer" , DiscordAreaType.CITIES, 13872), - CITY_VARROCK("Varrock" , DiscordAreaType.CITIES, 12596, 12597, 12598, 12852, 12853, 12854, 13108, 13109, 13110), + CITY_VARROCK("Varrock" , DiscordAreaType.CITIES, 12596, 12597, 12852, 12853, 12854, 13108, 13109, 13110), + CITY_VER_SINHAZA("Ver Sinhaza", DiscordAreaType.CITIES, 14642), + CITY_VOID_OUTPOST("Void Knights' Outpost", DiscordAreaType.CITIES, 10537), + CITY_WEISS("Weiss", DiscordAreaType.CITIES, 11325, 11581), CITY_WITCHHAVEN("Witchaven" , DiscordAreaType.CITIES, 10803), - CITY_WOODCUTTING_GUILD("Woodcutting Guild", DiscordAreaType.CITIES, 6454, 6198, 6298), CITY_YANILLE("Yanille" , DiscordAreaType.CITIES, 10288, 10032), CITY_ZANARIS("Zanaris" , DiscordAreaType.CITIES, 9285, 9541, 9540, 9797), - CITY_ZULANDRA("Zul-Andra" , DiscordAreaType.CITIES, 8751), + CITY_ZULANDRA("Zul-Andra" , DiscordAreaType.CITIES, 8495, 8751), // Dungeons DUNGEON_ABANDONED_MINE("Abandoned Mine", DiscordAreaType.DUNGEONS, 13718, 11079, 11078, 11077, 10823, 10822, 10821), DUNGEON_AH_ZA_RHOON("Ah Za Rhoon", DiscordAreaType.DUNGEONS, 11666), DUNGEON_ANCIENT_CAVERN("Ancient Cavern", DiscordAreaType.DUNGEONS, 6483, 6995), DUNGEON_APE_ATOLL("Ape Atoll Dungeon", DiscordAreaType.DUNGEONS, 11150, 10894), - DUNGEON_ARDY_SEWERS("Ardougne Sewers", DiscordAreaType.DUNGEONS, 10136), - DUNGEON_ASGARNIAN_ICE_CAVES("Asgarnian Ice Caves", DiscordAreaType.DUNGEONS, 12181), + DUNGEON_APE_ATOLL_BANANA_PLANTATION("Ape Atoll Banana Plantation", DiscordAreaType.DUNGEONS, 10895), + DUNGEON_ARDY_SEWERS("Ardougne Sewers", DiscordAreaType.DUNGEONS, 10136, 10647), + DUNGEON_ASGARNIAN_ICE_CAVES("Asgarnian Ice Caves", DiscordAreaType.DUNGEONS, 11925, 12181), + DUNGEON_BERVIRIUS_TOMB("Tomb of Bervirius", DiscordAreaType.DUNGEONS, 11154), DUNGEON_BRIMHAVEN("Brimhaven Dungeon", DiscordAreaType.DUNGEONS, 10901, 10900, 10899, 10645, 10644, 10643), DUNGEON_BRINE_RAT_CAVERN("Brine Rat Cavern", DiscordAreaType.DUNGEONS, 10910), DUNGEON_CATACOMBS_OF_KOUREND("Catacombs of Kourend", DiscordAreaType.DUNGEONS, 6557, 6556, 6813, 6812), + DUNGEON_CHAMPIONS_CHALLENGE("Champions' Challenge", DiscordAreaType.DUNGEONS, 12696), + DUNGEON_CHAOS_DRUID_TOWER("Chaos Druid Tower", DiscordAreaType.DUNGEONS, 10392), DUNGEON_CHASM_OF_FIRE("Chasm of Fire", DiscordAreaType.DUNGEONS, 5789), + DUNGEON_CHASM_OF_TEARS("Chasm of Tears", DiscordAreaType.DUNGEONS, 12948), + DUNGEON_CHINCHOMPA("Chinchompa Hunting Ground", DiscordAreaType.DUNGEONS, 10129), DUNGEON_CLOCK_TOWER("Clock Tower Basement", DiscordAreaType.DUNGEONS, 10390), DUNGEON_CORSAIR_COVE("Corsair Cove Dungeon", DiscordAreaType.DUNGEONS, 8076, 8332), DUNGEON_CRABCLAW_CAVES("Crabclaw Caves", DiscordAreaType.DUNGEONS, 6553, 6809), - DUNGEON_DIGSITE("Digsite Dungeon", DiscordAreaType.DUNGEONS, 13465), + DUNGEON_CRANDOR("Crandor Dungeon", DiscordAreaType.DUNGEONS, 11414), + DUNGEON_DIGSITE("Digsite Dungeon", DiscordAreaType.DUNGEONS, 13464, 13465), DUNGEON_DORGESHKAAN("Dorgesh-Kaan South Dungeon", DiscordAreaType.DUNGEONS, 10833), DUNGEON_DORGESHUUN_MINES("Dorgeshuun Mines", DiscordAreaType.DUNGEONS, 12950, 13206), DUNGEON_DRAYNOR_SEWERS("Draynor Sewers", DiscordAreaType.DUNGEONS, 12439, 12438), @@ -181,41 +195,60 @@ enum DiscordGameEventType DUNGEON_EDGEVILLE("Edgeville Dungeon", DiscordAreaType.DUNGEONS, 12441, 12442, 12443, 12698), DUNGEON_ELEMENTAL_WORKSHOP("Elemental Workshop", DiscordAreaType.DUNGEONS, 10906, 7760), DUNGEON_ENAKHRAS_TEMPLE("Enakhra's Temple", DiscordAreaType.DUNGEONS, 12423), - DUNGEON_ENTRANA("Entrana Dungeon", DiscordAreaType.DUNGEONS, 11416), DUNGEON_EVIL_CHICKENS_LAIR("Evil Chicken's Lair", DiscordAreaType.DUNGEONS, 9796), DUNGEON_EXPERIMENT_CAVE("Experiment Cave", DiscordAreaType.DUNGEONS, 14235, 13979), - DUNGEON_FREMENNIK_SLAYER("Fremennik Slayer Dungeon", DiscordAreaType.DUNGEONS, 10908, 11164), + DUNGEON_FEROX_ENCLAVE("Ferox Enclave Dungeon", DiscordAreaType.DUNGEONS, 12700), + DUNGEON_FORTHOS("Forthos Dungeon", DiscordAreaType.DUNGEONS, 7323), + DUNGEON_FREMENNIK_SLAYER("Fremennik Slayer Dungeon", DiscordAreaType.DUNGEONS, 10907, 10908, 11164), + DUNGEON_GLARIALS_TOMB("Glarial's Tomb", DiscordAreaType.DUNGEONS, 10137), DUNGEON_GOBLIN_CAVE("Goblin Cave", DiscordAreaType.DUNGEONS, 10393), DUNGEON_GRAND_TREE_TUNNELS("Grand Tree Tunnels", DiscordAreaType.DUNGEONS, 9882), - DUNGEON_HAM("H.A.M Dungeon", DiscordAreaType.DUNGEONS, 12694, 10321), + DUNGEON_HAM_HIDEOUT("H.A.M. Hideout", DiscordAreaType.DUNGEONS, 12694), + DUNGEON_HAM_STORE_ROOM("H.A.M. Store room", DiscordAreaType.DUNGEONS, 10321), + DUNGEON_HEROES_GUILD("Heroes' Guild Mine", DiscordAreaType.DUNGEONS, 11674), DUNGEON_IORWERTH("Iorwerth Dungeon", DiscordAreaType.DUNGEONS, 12737, 12738, 12993, 12994), DUNGEON_JATIZSO_MINES("Jatizso Mines", DiscordAreaType.DUNGEONS, 9631), DUNGEON_JIGGIG_BURIAL_TOMB("Jiggig Burial Tomb", DiscordAreaType.DUNGEONS, 9875, 9874), DUNGEON_JOGRE("Jogre Dungeon", DiscordAreaType.DUNGEONS, 11412), - DUNGEON_KARAMJA_VOLCANO("Karamja Volcano", DiscordAreaType.DUNGEONS, 11413, 11414), + DUNGEON_KARAMJA("Karamja Dungeon", DiscordAreaType.DUNGEONS, 11413), DUNGEON_KARUULM("Karuulm Slayer Dungeon", DiscordAreaType.DUNGEONS, 5280, 5279, 5023, 5535, 5022, 4766, 4510, 4511, 4767, 4768, 4512), - DUNGEON_KHARAZI("Khazari Dungeon", DiscordAreaType.DUNGEONS, 11153), + DUNGEON_KGP_HEADQUARTERS("KGP Headquarters", DiscordAreaType.DUNGEONS, 10658), + DUNGEON_KRUK("Kruk's Dungeon", DiscordAreaType.DUNGEONS, 9358, 9359, 9360, 9615, 9616, 9871, 10125, 10126, 10127, 10128, 10381, 10382, 10383, 10384, 10637, 10638, 10639, 10640), + DUNGEON_LEGENDS_GUILD("Legends' Guild Dungeon", DiscordAreaType.DUNGEONS, 10904), DUNGEON_LIGHTHOUSE("Lighthouse", DiscordAreaType.DUNGEONS, 10140), DUNGEON_LIZARDMAN_CAVES("Lizardman Caves", DiscordAreaType.DUNGEONS, 5275), + DUNGEON_LIZARDMAN_TEMPLE("Lizardman Temple", DiscordAreaType.DUNGEONS, 5277), DUNGEON_LUMBRIDGE_SWAMP_CAVES("Lumbridge Swamp Caves", DiscordAreaType.DUNGEONS, 12693, 12949), DUNGEON_LUNAR_ISLE_MINE("Lunar Isle Mine", DiscordAreaType.DUNGEONS, 9377), + DUNGEON_MANIACAL_HUNTER("Maniacal Monkey Hunter Area", DiscordAreaType.DUNGEONS, 11662), DUNGEON_MISCELLANIA("Miscellania Dungeon", DiscordAreaType.DUNGEONS, 10144, 10400), DUNGEON_MOGRE_CAMP("Mogre Camp", DiscordAreaType.DUNGEONS, 11924), DUNGEON_MOS_LE_HARMLESS_CAVES("Mos Le'Harmless Caves", DiscordAreaType.DUNGEONS, 14994, 14995, 15251), + DUNGEON_MOTHERLODE_MINE("Motherlode Mine", DiscordAreaType.DUNGEONS, 14679, 14680, 14681, 14935, 14936, 14937, 15191, 15192, 15193), + DUNGEON_MOURNER_TUNNELS("Mourner Tunnels", DiscordAreaType.DUNGEONS, 7752, 8008), DUNGEON_MOUSE_HOLE("Mouse Hole", DiscordAreaType.DUNGEONS, 9046), + DUNGEON_MYREDITCH_LABORATORIES("Myreditch Laboratories", DiscordAreaType.DUNGEONS, 14232, 14233, 14487, 14488), + DUNGEON_MYREQUE("Myreque Hideout", DiscordAreaType.DUNGEONS, 13721, 13974, 13977, 13978), + DUNGEON_MYTHS_GUILD("Myths' Guild Dungeon", DiscordAreaType.DUNGEONS, 7564, 7820, 7821), DUNGEON_OBSERVATORY("Observatory Dungeon", DiscordAreaType.DUNGEONS, 9362), DUNGEON_OGRE_ENCLAVE("Ogre Enclave", DiscordAreaType.DUNGEONS, 10387), + DUNGEON_OURANIA("Ourania Cave", DiscordAreaType.DUNGEONS, 12119), DUNGEON_QUIDAMORTEM_CAVE("Quidamortem Cave", DiscordAreaType.DUNGEONS, 4763), DUNGEON_RASHILIYIAS_TOMB("Rashiliyta's Tomb", DiscordAreaType.DUNGEONS, 11668), DUNGEON_SARADOMINSHRINE("Saradomin Shrine (Paterdomus)", DiscordAreaType.DUNGEONS, 13722), DUNGEON_SHADE_CATACOMBS("Shade Catacombs", DiscordAreaType.DUNGEONS, 13975), + DUNGEON_SHADOW("Shadow Dungeon", DiscordAreaType.DUNGEONS, 10575, 10831), DUNGEON_SHAYZIEN_CRYPTS("Shayzien Crypts", DiscordAreaType.DUNGEONS, 6043), + DUNGEON_SISTERHOOD_SANCTUARY("Sisterhood Sanctuary", DiscordAreaType.DUNGEONS, 14999, 15000, 15001, 15255, 15256, 15257, 15511, 15512, 15513), DUNGEON_SMOKE("Smoke Dungeon", DiscordAreaType.DUNGEONS, 12946, 13202), DUNGEON_SOPHANEM("Sophanem Dungeon", DiscordAreaType.DUNGEONS, 13200), + DUNGEON_SOURHOG_CAVE("Sourhog Cave", DiscordAreaType.DUNGEONS, 12695), DUNGEON_STRONGHOLD_SECURITY("Stronghold of Security", DiscordAreaType.DUNGEONS, 7505, 8017, 8530, 9297), + DUNGEON_STRONGHOLD_SLAYER("Stronghold Slayer Cave", DiscordAreaType.DUNGEONS, 9624, 9625, 9880, 9881), DUNGEON_TARNS_LAIR("Tarn's Lair", DiscordAreaType.DUNGEONS, 12616, 12615), - DUNGEON_TAVERLEY("Taverley Dungeon", DiscordAreaType.DUNGEONS, 11673, 11672, 11929, 11928, 11417), + DUNGEON_TAVERLEY("Taverley Dungeon", DiscordAreaType.DUNGEONS, 11416, 11417, 11671, 11672, 11673, 11928, 11929), DUNGEON_TEMPLE_OF_IKOV("Temple of Ikov", DiscordAreaType.DUNGEONS, 10649, 10905, 10650), + DUNGEON_TEMPLE_OF_LIGHT("Temple of Light", DiscordAreaType.DUNGEONS, 7496), DUNGEON_TEMPLE_OF_MARIMBO("Temple of Marimbo", DiscordAreaType.DUNGEONS, 11151), DUNGEON_THE_WARRENS("The Warrens", DiscordAreaType.DUNGEONS, 7070, 7326), DUNGEON_TOLNA("Dungeon of Tolna", DiscordAreaType.DUNGEONS, 13209), @@ -224,32 +257,39 @@ enum DiscordGameEventType DUNGEON_TUNNEL_OF_CHAOS("Tunnel of Chaos", DiscordAreaType.DUNGEONS, 12625), DUNGEON_UNDERGROUND_PASS("Underground Pass", DiscordAreaType.DUNGEONS, 9369, 9370), DUNGEON_VARROCKSEWERS("Varrock Sewers", DiscordAreaType.DUNGEONS, 12954, 13210), + DUNGEON_VIYELDI_CAVES("Viyeldi Caves", DiscordAreaType.DUNGEONS, 9545, 11153), + DUNGEON_WARRIORS_GUILD("Warriors' Guild Basement", DiscordAreaType.DUNGEONS, 11675), DUNGEON_WATER_RAVINE("Water Ravine", DiscordAreaType.DUNGEONS, 13461), DUNGEON_WATERBIRTH("Waterbirth Dungeon", DiscordAreaType.DUNGEONS, 9886, 10142, 7492, 7748), DUNGEON_WATERFALL("Waterfall Dungeon", DiscordAreaType.DUNGEONS, 10394), - DUNGEON_WHITE_WOLF_MOUNTAIN_CAVES("White Wolf Mountain Caves", DiscordAreaType.DUNGEONS, 11418, 11419, 11675), + DUNGEON_WEREWOLF_AGILITY("Werewolf Agility Course", DiscordAreaType.DUNGEONS, 14234), + DUNGEON_WHITE_WOLF_MOUNTAIN_CAVES("White Wolf Mountain Caves", DiscordAreaType.DUNGEONS, 11418, 11419), DUNGEON_WITCHAVEN_SHRINE("Witchhaven Shrine Dungeon", DiscordAreaType.DUNGEONS, 10903), + DUNGEON_WIZARDS_TOWER("Wizards' Tower Basement", DiscordAreaType.DUNGEONS, 12437), + DUNGEON_WOODCUTTING_GUILD("Woodcutting Guild Dungeon", DiscordAreaType.DUNGEONS, 6298), + DUNGEON_WYVERN_CAVE("Wyvern Cave", DiscordAreaType.DUNGEONS, 14495, 14496), DUNGEON_YANILLE_AGILITY("Yanille Agility Dungeon", DiscordAreaType.DUNGEONS, 10388), - DUNGEON_MOTHERLODE_MINE("Motherlode Mine", DiscordAreaType.DUNGEONS, 14679, 14680, 14681, 14935, 14936, 14937, 15191, 15192, 15193), - DUNGEON_NIGHTMARE("Nightmare Dungeon", DiscordAreaType.DUNGEONS, 14999, 15000, 15001, 15255, 15256, 15257, 15511, 15512, 15513), // Minigames + MG_ARDOUGNE_RAT_PITS("Ardougne Rat Pits", DiscordAreaType.MINIGAMES, 10646), MG_BARBARIAN_ASSAULT("Barbarian Assault", DiscordAreaType.MINIGAMES, 10332), MG_BARROWS("Barrows", DiscordAreaType.MINIGAMES, 14131, 14231), MG_BLAST_FURNACE("Blast Furnace", DiscordAreaType.MINIGAMES, 7757), MG_BRIMHAVEN_AGILITY_ARENA("Brimhaven Agility Arena", DiscordAreaType.MINIGAMES, 11157), MG_BURTHORPE_GAMES_ROOM("Burthorpe Games Room", DiscordAreaType.MINIGAMES, 8781), MG_CASTLE_WARS("Castle Wars", DiscordAreaType.MINIGAMES, 9520, 9620), - MG_CLAN_WARS("Clan Wars", DiscordAreaType.MINIGAMES, 13135, 13134, 13133, 13131, 13130, 13387, 13386), - MG_DUEL_ARENA("Duel Arena", DiscordAreaType.MINIGAMES, 13362), + MG_CLAN_WARS("Clan Wars", DiscordAreaType.MINIGAMES, 12621, 12622, 12623, 13130, 13131, 13133, 13134, 13135, 13386, 13387, 13390, 13641, 13642, 13643, 13644, 13645, 13646, 13647, 13899, 13900, 14155, 14156), + MG_DUEL_ARENA("Duel Arena", DiscordAreaType.MINIGAMES, 13362, 13363), MG_FISHING_TRAWLER("Fishing Trawler", DiscordAreaType.MINIGAMES, 7499), MG_GAUNTLET("The Gauntlet", DiscordAreaType.MINIGAMES, 12127, 7512, 7768), - MG_INFERNO("The Inferno", DiscordAreaType.MINIGAMES, 9043), - MG_LAST_MAN_STANDING("Last Man Standing", DiscordAreaType.MINIGAMES, 13660, 13659, 13658, 13916, 13915, 13914), MG_HALLOWED_SEPULCHRE("Hallowed Sepulchre", DiscordAreaType.MINIGAMES, 8797, 9051, 9052, 9053, 9054, 9309, 9563, 9565, 9821, 10074, 10075, 10077), + MG_INFERNO("The Inferno", DiscordAreaType.MINIGAMES, 9043), + MG_KELDAGRIM_RAT_PITS("Keldagrim Rat Pits", DiscordAreaType.MINIGAMES, 7753), + MG_LAST_MAN_STANDING("Last Man Standing", DiscordAreaType.MINIGAMES, 13660, 13659, 13658, 13916, 13915, 13914), MG_MAGE_TRAINING_ARENA("Mage Training Arena", DiscordAreaType.MINIGAMES, 13462, 13463), MG_NIGHTMARE_ZONE("Nightmare Zone", DiscordAreaType.MINIGAMES, 9033), MG_PEST_CONTROL("Pest Control", DiscordAreaType.MINIGAMES, 10536), + MG_PORT_SARIM_RAT_PITS("Port Sarim Rat Pits", DiscordAreaType.MINIGAMES, 11926), MG_PYRAMID_PLUNDER("Pyramid Plunder", DiscordAreaType.MINIGAMES, 7749), MG_ROGUES_DEN("Rogues' Den", DiscordAreaType.MINIGAMES, 11855, 11854, 12111, 12110), MG_SORCERESS_GARDEN("Sorceress's Garden", DiscordAreaType.MINIGAMES, 11605), @@ -258,11 +298,119 @@ enum DiscordGameEventType MG_TROUBLE_BREWING("Trouble Brewing", DiscordAreaType.MINIGAMES, 15150), MG_TZHAAR_FIGHT_CAVES("Tzhaar Fight Caves", DiscordAreaType.MINIGAMES, 9551), MG_TZHAAR_FIGHT_PITS("Tzhaar Fight Pits", DiscordAreaType.MINIGAMES, 9552), + MG_VARROCK_RAT_PITS("Varrock Rat Pits", DiscordAreaType.MINIGAMES, 11599), MG_VOLCANIC_MINE("Volcanic Mine", DiscordAreaType.MINIGAMES, 15263, 15262), // Raids RAIDS_CHAMBERS_OF_XERIC("Chambers of Xeric", DiscordAreaType.RAIDS, Varbits.IN_RAID), - RAIDS_THEATRE_OF_BLOOD("Theatre of Blood", DiscordAreaType.RAIDS, Varbits.THEATRE_OF_BLOOD); + RAIDS_THEATRE_OF_BLOOD("Theatre of Blood", DiscordAreaType.RAIDS, Varbits.THEATRE_OF_BLOOD), + + // Other + REGION_ABYSSAL_AREA("Abyssal Area", DiscordAreaType.REGIONS, 12108), + REGION_ABYSSAL_NEXUS("Abyssal Nexus", DiscordAreaType.REGIONS, 12106), + REGION_AGILITY_PYRAMID("Agility Pyramid", DiscordAreaType.REGIONS, 12105, 13356), + REGION_AIR_ALTAR("Air Altar", DiscordAreaType.REGIONS, 11339), + REGION_AL_KHARID_MINE("Al Kharid Mine", DiscordAreaType.REGIONS, 13107), + REGION_APE_ATOLL("Ape Atoll" , DiscordAreaType.REGIONS, 10795, 10974, 11050), + REGION_ARANDAR("Arandar", DiscordAreaType.REGIONS, 9266, 9267, 9523), + REGION_ASGARNIA("Asgarnia", DiscordAreaType.REGIONS, 11825, 11829, 11830, 12085, 12086), + REGION_BATTLEFIELD("Battlefield", DiscordAreaType.REGIONS, 10034), + REGION_BATTLEFRONT("Battlefront", DiscordAreaType.REGIONS, 5433, 5434), + REGION_BLAST_MINE("Blast Mine", DiscordAreaType.REGIONS, 5948), + REGION_BODY_ALTAR("Body Altar", DiscordAreaType.REGIONS, 10059), + REGION_CHAOS_ALTAR("Chaos Altar", DiscordAreaType.REGIONS, 9035), + REGION_COSMIC_ALTAR("Cosmic Altar", DiscordAreaType.REGIONS, 8523), + REGION_COSMIC_ENTITYS_PLANE("Cosmic Entity's Plane", DiscordAreaType.REGIONS, 8267), + REGION_CRABCLAW_ISLE("Crabclaw Isle", DiscordAreaType.REGIONS, 6965), + REGION_CRAFTING_GUILD("Crafting Guild", DiscordAreaType.REGIONS, 11571), + REGION_CRANDOR("Crandor", DiscordAreaType.REGIONS, 11314, 11315), + REGION_CRASH_ISLAND("Crash Island", DiscordAreaType.REGIONS, 11562), + REGION_DARK_ALTAR("Dark Altar", DiscordAreaType.REGIONS, 6716), + REGION_DEATH_ALTAR("Death Altar", DiscordAreaType.REGIONS, 8779), + REGION_DEATH_PLATEAU("Death Plateau", DiscordAreaType.REGIONS, 11320), + REGION_DENSE_ESSENCE("Dense Essence Mine", DiscordAreaType.REGIONS, 6972), + REGION_DIGSITE("Digsite", DiscordAreaType.REGIONS, 13365), + REGION_DRAGONTOOTH("Dragontooth Island", DiscordAreaType.REGIONS, 15159), + REGION_DRAYNOR_MANOR("Draynor Manor", DiscordAreaType.REGIONS, 12340), + REGION_EAGLES_PEAK("Eagles' Peak", DiscordAreaType.REGIONS, 9270), + REGION_EARTH_ALTAR("Earth Altar", DiscordAreaType.REGIONS, 10571), + REGION_ENCHANTED_VALLEY("Enchanted Valley", DiscordAreaType.REGIONS, 12102), + REGION_EXAM_CENTRE("Exam Centre", DiscordAreaType.REGIONS, 13364), + REGION_FALADOR_FARM("Falador Farm", DiscordAreaType.REGIONS, 12083), + REGION_FARMING_GUILD("Farming Guild", DiscordAreaType.REGIONS, 4922), + REGION_FELDIP_HILLS("Feldip Hills", DiscordAreaType.REGIONS, 9773, 9774, 10029, 10030, 10285, 10286, 10287, 10542, 10543), + REGION_FENKENSTRAIN("Fenkenstrain's Castle", DiscordAreaType.REGIONS, 14135), + REGION_FIRE_ALTAR("Fire Altar", DiscordAreaType.REGIONS, 10315), + REGION_FISHER_REALM("Fisher Realm", DiscordAreaType.REGIONS, 10569), + REGION_FISHING_GUILD("Fishing Guild", DiscordAreaType.REGIONS, 10293), + REGION_FISHING_PLATFORM("Fishing Platform", DiscordAreaType.REGIONS, 11059), + REGION_FORSAKEN_TOWER("The Forsaken Tower", DiscordAreaType.REGIONS, 5435), + REGION_FOSSIL_ISLAND("Fossil Island", DiscordAreaType.REGIONS, 14650, 14651, 14652, 14906, 14907, 14908, 15162, 15163, 15164), + REGION_FREMENNIK("Fremennik Province", DiscordAreaType.REGIONS, 10296, 10552, 10808, 10809, 10810, 10811, 11064), + REGION_FREMENNIK_ISLES("Fremennik Isles", DiscordAreaType.REGIONS, 9276, 9532), + REGION_GALVEK_SHIPWRECKS("Galvek Shipwrecks", DiscordAreaType.REGIONS, 6486, 6487, 6488, 6489, 6742, 6743, 6744, 6745), + REGION_GORAKS_PLANE("Gorak's Plane", DiscordAreaType.REGIONS, 12115), + REGION_GRAND_EXCHANGE("Grand Exchange", DiscordAreaType.REGIONS, 12598), + REGION_GWD("God Wars Dungeon", DiscordAreaType.REGIONS, 11578), + REGION_HARMONY("Harmony Island", DiscordAreaType.REGIONS, 15148), + REGION_ICE_PATH("Ice Path", DiscordAreaType.REGIONS, 11322, 11323), + REGION_ICEBERG("Iceberg", DiscordAreaType.REGIONS, 10558, 10559), + REGION_ICYENE_GRAVEYARD("Icyene Graveyard", DiscordAreaType.REGIONS, 14641, 14897, 14898), + REGION_ISAFDAR("Isafdar", DiscordAreaType.REGIONS, 8497, 8753, 8754, 9009, 9010), + REGION_ISLAND_OF_STONE("Island of Stone", DiscordAreaType.REGIONS, 9790), + REGION_JIGGIG("Jiggig" , DiscordAreaType.REGIONS, 9775), + REGION_KANDARIN("Kandarin", DiscordAreaType.REGIONS, 9014, 9263, 9264, 9519, 9524, 9527, 9776, 9783, 10037, 10290, 10294, 10546, 10551, 10805), + REGION_KARAMJA("Karamja" , DiscordAreaType.REGIONS, 10801, 10802, 11054, 11311, 11312, 11313, 11566, 11567, 11568, 11569, 11822), + REGION_KEBOS_LOWLANDS("Kebos Lowlands", DiscordAreaType.REGIONS, 4665, 4666, 4921, 5178), + REGION_KEBOS_SWAMP("Kebos Swamp", DiscordAreaType.REGIONS, 4664, 4920, 5174, 5175, 5176, 5430, 5431), + REGION_KHARAZI_JUNGLE("Kharazi Jungle", DiscordAreaType.REGIONS, 11053, 11309, 11565, 11821), + REGION_KHARIDIAN_DESERT("Kharidian Desert", DiscordAreaType.REGIONS, 12844, 12845, 12846, 12847, 12848, 13100, 13101, 13102, 13103, 13104, 13357, 13359, 13360, 13614, 13615, 13616), + REGION_KOUREND("Great Kourend", DiscordAreaType.REGIONS, 6201, 6457, 6713), + REGION_KOUREND_WOODLAND("Kourend Woodland", DiscordAreaType.REGIONS, 5942, 6197, 6453), + REGION_LAW_ALTAR("Law Altar", DiscordAreaType.REGIONS, 9803), + REGION_LEGENDS_GUILD("Legends' Guild", DiscordAreaType.REGIONS, 10804), + REGION_LIGHTHOUSE("Lighthouse", DiscordAreaType.REGIONS, 10040), + REGION_LITHKREN("Lithkren", DiscordAreaType.REGIONS, 14142, 14398), + REGION_LUMBRIDGE_SWAMP("Lumbridge Swamp", DiscordAreaType.REGIONS, 12593, 12849), + REGION_MAX_ISLAND("Max Island", DiscordAreaType.REGIONS, 11063), + REGION_MCGRUBORS_WOOD("McGrubor's Wood", DiscordAreaType.REGIONS, 10550), + REGION_MIND_ALTAR("Mind Altar", DiscordAreaType.REGIONS, 11083), + REGION_MISTHALIN("Misthalin", DiscordAreaType.REGIONS, 12594, 12595), + REGION_MOLCH("Molch", DiscordAreaType.REGIONS, 5177), + REGION_MOLCH_ISLAND("Molch Island", DiscordAreaType.REGIONS, 5432), + REGION_MORYTANIA("Morytania", DiscordAreaType.REGIONS, 13619, 13620, 13621, 13622, 13876, 13877, 13879, 14133, 14134, 14389, 14390, 14391, 14645, 14647), + REGION_MOUNT_QUIDAMORTEM("Mount Quidamortem", DiscordAreaType.REGIONS, 4662, 4663, 4918, 4919), + REGION_MUDSKIPPER("Mudskipper Point", DiscordAreaType.REGIONS, 11824), + REGION_MYTHS_GUILD("Myths' Guild", DiscordAreaType.REGIONS, 9772), + REGION_NATURE_ALTAR("Nature Altar", DiscordAreaType.REGIONS, 9547), + REGION_NORTHERN_TUNDRAS("Northern Tundras", DiscordAreaType.REGIONS, 6204, 6205, 6717), + REGION_OBSERVATORY("Observatory", DiscordAreaType.REGIONS, 9777), + REGION_OTTOS_GROTTO("Otto's Grotto", DiscordAreaType.REGIONS, 10038), + REGION_OURANIA_HUNTER("Ourania Hunter Area", DiscordAreaType.REGIONS, 9778), + REGION_PIRATES_COVE("Pirates' Cove", DiscordAreaType.REGIONS, 8763), + REGION_PISCATORIS_HUNTER_AREA("Piscatoris Hunter Area", DiscordAreaType.REGIONS, 9015, 9016, 9271, 9272, 9528), + REGION_POH("Player Owned House", DiscordAreaType.REGIONS, 7513, 7514, 7769, 7770), + REGION_POISON_WASTE("Poison Waste", DiscordAreaType.REGIONS, 8752, 9008), + REGION_PORT_TYRAS("Port Tyras", DiscordAreaType.REGIONS, 8496), + REGION_PURO_PURO("Puro Puro", DiscordAreaType.REGIONS, 10307), + REGION_QUARRY("Quarry", DiscordAreaType.REGIONS, 12589), + REGION_RANGING_GUILD("Ranging Guild", DiscordAreaType.REGIONS, 10549), + REGION_RATCATCHERS_MANSION("Ratcatchers Mansion", DiscordAreaType.REGIONS, 11343), + REGION_RUNE_ESSENCE_MINE("Rune Essence Mine", DiscordAreaType.REGIONS, 11595), + REGION_SHIP_YARD("Ship Yard", DiscordAreaType.REGIONS, 11823), + REGION_SILVAREA("Silvarea", DiscordAreaType.REGIONS, 13366), + REGION_SINCLAR_MANSION("Sinclair Mansion", DiscordAreaType.REGIONS, 10807), + REGION_SLAYER_TOWER("Slayer Tower", DiscordAreaType.REGIONS, 13623, 13723), + REGION_SOUL_ALTAR("Soul Altar", DiscordAreaType.REGIONS, 7228), + REGION_TROLL_ARENA("Troll Arena", DiscordAreaType.REGIONS, 11576), + REGION_TROLLHEIM("Trollheim", DiscordAreaType.REGIONS, 11577), + REGION_TROLLWEISS_MTN("Trollweiss Mountain", DiscordAreaType.REGIONS, 11066, 11067, 11068), + REGION_UNDERWATER("Underwater", DiscordAreaType.REGIONS, 15008, 15264), + REGION_WATER_ALTAR("Water Altar", DiscordAreaType.REGIONS, 10827), + REGION_WINTERTODT_CAMP("Wintertodt Camp", DiscordAreaType.REGIONS, 6461), + REGION_WIZARDS_TOWER("Wizards' Tower", DiscordAreaType.REGIONS, 12337), + REGION_WOODCUTTING_GUILD("Woodcutting Guild", DiscordAreaType.REGIONS, 6198, 6454), + REGION_WRATH_ALTAR("Wrath Altar", DiscordAreaType.REGIONS, 9291); private static final Map FROM_REGION; private static final List FROM_VARBITS; From 9dfcdb51d634c79d5081f39c874712270da81958 Mon Sep 17 00:00:00 2001 From: Broooklyn <54762282+Broooklyn@users.noreply.github.com> Date: Thu, 17 Sep 2020 22:38:01 -0400 Subject: [PATCH 30/31] discord: fix Barbarian Assault regions --- .../runelite/client/plugins/discord/DiscordGameEventType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java index 46a484d312..75304be4e3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/discord/DiscordGameEventType.java @@ -272,7 +272,7 @@ enum DiscordGameEventType // Minigames MG_ARDOUGNE_RAT_PITS("Ardougne Rat Pits", DiscordAreaType.MINIGAMES, 10646), - MG_BARBARIAN_ASSAULT("Barbarian Assault", DiscordAreaType.MINIGAMES, 10332), + MG_BARBARIAN_ASSAULT("Barbarian Assault", DiscordAreaType.MINIGAMES, 7508, 7509, 10322), MG_BARROWS("Barrows", DiscordAreaType.MINIGAMES, 14131, 14231), MG_BLAST_FURNACE("Blast Furnace", DiscordAreaType.MINIGAMES, 7757), MG_BRIMHAVEN_AGILITY_ARENA("Brimhaven Agility Arena", DiscordAreaType.MINIGAMES, 11157), From f7606c7acaf25331331e85d4d1bad7b8e2ff3e9c Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 17 Sep 2020 13:41:48 -0400 Subject: [PATCH 31/31] ui: fix frame maximized bounds with dpi scaling Due to JDK-4737788, maximizing an undecorated frame incorrectly covers the taskbar. Substance attempts to correct this by computing its own maximized bounds, but it does not account for DPI scaling. Since Substance automatically calls setMaximizedBounds when the frame is resized to do this we simply override it and replace the bounds with our own which includes the scaling of the display. This also fixes the frame maximizing to the incorrect display on 11.0.8 due to JDK-8231564, which changes the coordinates setMaximizedBounds() expects to be relative to the primary display instead of the current display. Previously, Substance was always setting the bounds x/y to 0 due to this. Co-authored-by: Runemoro --- .../runelite/client/ui/ContainableFrame.java | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java index e65d6c9fa7..b03c863dda 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ContainableFrame.java @@ -25,11 +25,21 @@ package net.runelite.client.ui; import java.awt.Frame; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Insets; import java.awt.Rectangle; +import java.awt.Toolkit; +import java.util.Arrays; +import java.util.Comparator; import javax.swing.JFrame; import lombok.Setter; +import lombok.extern.slf4j.Slf4j; import net.runelite.client.config.ExpandResizeType; +import net.runelite.client.util.OSType; +@Slf4j public class ContainableFrame extends JFrame { public enum Mode @@ -39,6 +49,23 @@ public class ContainableFrame extends JFrame NEVER; } + private static boolean jdk8231564; + + static + { + try + { + String javaVersion = System.getProperty("java.version"); + String[] s = javaVersion.split("\\."); + int major = Integer.parseInt(s[0]), minor = Integer.parseInt(s[1]), patch = Integer.parseInt(s[2]); + jdk8231564 = major > 11 || (major == 11 && minor > 0) || (major == 11 && minor == 0 && patch >= 8); + } + catch (Exception ex) + { + log.error("error checking java version", ex); + } + } + private static final int SCREEN_EDGE_CLOSE_DISTANCE = 40; @Setter @@ -186,6 +213,97 @@ public class ContainableFrame extends JFrame expandedClientOppositeDirection = false; } + /** + * Due to Java bug JDK-4737788, maximizing an undecorated frame causes it to cover the taskbar. + * As a workaround, Substance calls this method when the window is maximized to manually set the + * bounds, but its calculation ignores high-DPI scaling. We're overriding it to correctly calculate + * the maximized bounds. + */ + @Override + public void setMaximizedBounds(Rectangle bounds) + { + if (OSType.getOSType() == OSType.MacOS) + { + // OSX seems to correctly handle DPI scaling already + super.setMaximizedBounds(bounds); + } + else + { + super.setMaximizedBounds(getWindowAreaBounds()); + } + } + + /** + * Finds the {@link GraphicsConfiguration} of the display the window is currently on. If it's on more than + * one screen, returns the one it's most on (largest area of intersection) + */ + private GraphicsConfiguration getCurrentDisplayConfiguration() + { + return Arrays.stream(GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) + .map(GraphicsDevice::getDefaultConfiguration) + .max(Comparator.comparing(config -> + { + Rectangle intersection = config.getBounds().intersection(getBounds()); + return intersection.width * intersection.height; + })) + .orElseGet(this::getGraphicsConfiguration); + } + + /** + * Calculates the bounds of the window area of the screen. + *

+ * The bounds returned by {@link GraphicsEnvironment#getMaximumWindowBounds} are incorrectly calculated on + * high-DPI screens. + */ + private Rectangle getWindowAreaBounds() + { + log.trace("Current bounds: {}", getBounds()); + for (GraphicsDevice device : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) + { + log.trace("Device: {} bounds {}", device, device.getDefaultConfiguration().getBounds()); + } + + GraphicsConfiguration config = getCurrentDisplayConfiguration(); + // get screen bounds + Rectangle bounds = config.getBounds(); + log.trace("Chosen device: {} bounds {}", config, bounds); + + // transform bounds to dpi-independent coordinates + if (!jdk8231564) + { + // JDK-8231564 fixed setMaximizedBounds to scale the bounds, so this must only be done on <11.0.8 + bounds = config.getDefaultTransform().createTransformedShape(bounds).getBounds(); + log.trace("Transformed bounds {}", bounds); + } + + // subtract insets (taskbar, etc.) + Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config); + if (!jdk8231564) + { + // Prior to JDK-8231564, WFramePeer expects the bounds to be relative to the current monitor instead of the + // primary display. + bounds.x = bounds.y = 0; + } + else + { + // The insets from getScreenInsets are not scaled, we must convert them to DPI scaled pixels on 11.0.8 due + // to JDK-8231564 which expects the bounds to be in DPI-aware pixels. + double scaleX = config.getDefaultTransform().getScaleX(); + double scaleY = config.getDefaultTransform().getScaleY(); + insets.top /= scaleY; + insets.bottom /= scaleY; + insets.left /= scaleX; + insets.right /= scaleX; + } + bounds.x += insets.left; + bounds.y += insets.top; + bounds.height -= (insets.bottom + insets.top); + bounds.width -= (insets.right + insets.left); + + log.trace("Final bounds: {}", bounds); + return bounds; + } + /** * Force minimum size of frame to be it's layout manager's minimum size */