From bb4ef3298ef219023310b45c260b36b1635c820c Mon Sep 17 00:00:00 2001 From: Toocanzs Date: Fri, 12 Jul 2019 16:44:17 -0400 Subject: [PATCH 01/26] fix MSAA white pixels --- .../main/resources/net/runelite/client/plugins/gpu/frag.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl index 03d8464642..646d5dfd7d 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/gpu/frag.glsl @@ -31,7 +31,7 @@ uniform float smoothBanding; uniform vec4 fogColor; in vec4 Color; -in float fHsl; +centroid in float fHsl; in vec4 fUv; in float fogAmount; From 742133e456daa2b5fa1f9fc57aac910fd51ac223 Mon Sep 17 00:00:00 2001 From: TheStonedTurtle Date: Sun, 21 Jul 2019 12:03:33 -0700 Subject: [PATCH 02/26] Fix BrokenOnDeathItems death value by adding repair price Jagex uses the repair price when determing items lost on death by value. adds test for this case as well --- .../itemskeptondeath/BrokenOnDeathItem.java | 104 +++++++++--------- .../ItemsKeptOnDeathPlugin.java | 28 +++-- .../ItemsKeptOnDeathPluginTest.java | 20 ++++ 3 files changed, 92 insertions(+), 60 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/BrokenOnDeathItem.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/BrokenOnDeathItem.java index 9f1fd5c95e..8512a05541 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/BrokenOnDeathItem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/BrokenOnDeathItem.java @@ -24,7 +24,8 @@ */ package net.runelite.client.plugins.itemskeptondeath; -import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableMap; +import javax.annotation.Nullable; import lombok.AllArgsConstructor; import net.runelite.api.ItemID; @@ -37,75 +38,76 @@ import net.runelite.api.ItemID; enum BrokenOnDeathItem { // Capes - FIRE_CAPE(ItemID.FIRE_CAPE), - FIRE_MAX_CAPE(ItemID.FIRE_MAX_CAPE), - INFERNAL_CAPE(ItemID.INFERNAL_CAPE), - INFERNAL_MAX_CAPE(ItemID.INFERNAL_MAX_CAPE), - AVAS_ASSEMBLER(ItemID.AVAS_ASSEMBLER), - ASSEMBLER_MAX_CAPE(ItemID.ASSEMBLER_MAX_CAPE), + FIRE_CAPE(ItemID.FIRE_CAPE, 50000), + FIRE_MAX_CAPE(ItemID.FIRE_MAX_CAPE, 50000), + INFERNAL_CAPE(ItemID.INFERNAL_CAPE, 50000), + INFERNAL_MAX_CAPE(ItemID.INFERNAL_MAX_CAPE, 50000), + AVAS_ASSEMBLER(ItemID.AVAS_ASSEMBLER, 75000), + ASSEMBLER_MAX_CAPE(ItemID.ASSEMBLER_MAX_CAPE, 75000), // Defenders - BRONZE_DEFENDER(ItemID.BRONZE_DEFENDER), - IRON_DEFENDER(ItemID.IRON_DEFENDER), - STEEL_DEFENDER(ItemID.STEEL_DEFENDER), - BLACK_DEFENDER(ItemID.BLACK_DEFENDER), - MITHRIL_DEFENDER(ItemID.MITHRIL_DEFENDER), - ADAMANT_DEFENDER(ItemID.ADAMANT_DEFENDER), - RUNE_DEFENDER(ItemID.RUNE_DEFENDER), - DRAGON_DEFENDER(ItemID.DRAGON_DEFENDER), - AVERNIC_DEFENDER(ItemID.AVERNIC_DEFENDER), + BRONZE_DEFENDER(ItemID.BRONZE_DEFENDER, 1000), + IRON_DEFENDER(ItemID.IRON_DEFENDER, 2000), + STEEL_DEFENDER(ItemID.STEEL_DEFENDER, 2500), + BLACK_DEFENDER(ItemID.BLACK_DEFENDER, 5000), + MITHRIL_DEFENDER(ItemID.MITHRIL_DEFENDER, 15000), + ADAMANT_DEFENDER(ItemID.ADAMANT_DEFENDER, 25000), + RUNE_DEFENDER(ItemID.RUNE_DEFENDER, 35000), + DRAGON_DEFENDER(ItemID.DRAGON_DEFENDER, 40000), + AVERNIC_DEFENDER(ItemID.AVERNIC_DEFENDER, 1000000), // Void - VOID_MAGE_HELM(ItemID.VOID_MAGE_HELM), - VOID_RANGER_HELM(ItemID.VOID_RANGER_HELM), - VOID_MELEE_HELM(ItemID.VOID_MELEE_HELM), - VOID_KNIGHT_TOP(ItemID.VOID_KNIGHT_TOP), - VOID_KNIGHT_ROBE(ItemID.VOID_KNIGHT_ROBE), - VOID_KNIGHT_GLOVES(ItemID.VOID_KNIGHT_GLOVES), - VOID_KNIGHT_MACE(ItemID.VOID_KNIGHT_MACE), - ELITE_VOID_TOP(ItemID.ELITE_VOID_TOP), - ELITE_VOID_ROBE(ItemID.ELITE_VOID_ROBE), + VOID_MAGE_HELM(ItemID.VOID_MAGE_HELM, 40000), + VOID_RANGER_HELM(ItemID.VOID_RANGER_HELM, 40000), + VOID_MELEE_HELM(ItemID.VOID_MELEE_HELM, 40000), + VOID_KNIGHT_TOP(ItemID.VOID_KNIGHT_TOP, 45000), + VOID_KNIGHT_ROBE(ItemID.VOID_KNIGHT_ROBE, 45000), + VOID_KNIGHT_GLOVES(ItemID.VOID_KNIGHT_GLOVES, 30000), + ELITE_VOID_TOP(ItemID.ELITE_VOID_TOP, 50000), + ELITE_VOID_ROBE(ItemID.ELITE_VOID_ROBE, 50000), // Barb Assault - FIGHTER_HAT(ItemID.FIGHTER_HAT), - RANGER_HAT(ItemID.RANGER_HAT), - HEALER_HAT(ItemID.HEALER_HAT), - FIGHTER_TORSO(ItemID.FIGHTER_TORSO), - PENANCE_SKIRT(ItemID.PENANCE_SKIRT), + FIGHTER_HAT(ItemID.FIGHTER_HAT, 45000), + RANGER_HAT(ItemID.RANGER_HAT, 45000), + HEALER_HAT(ItemID.HEALER_HAT, 45000), + FIGHTER_TORSO(ItemID.FIGHTER_TORSO, 50000), + PENANCE_SKIRT(ItemID.PENANCE_SKIRT, 20000), // Castle Wars - SARADOMIN_HALO(ItemID.SARADOMIN_HALO), - ZAMORAK_HALO(ItemID.ZAMORAK_HALO), - GUTHIX_HALO(ItemID.GUTHIX_HALO), - DECORATIVE_MAGIC_HAT(ItemID.DECORATIVE_ARMOUR_11898), - DECORATIVE_MAGIC_ROBE_TOP(ItemID.DECORATIVE_ARMOUR_11896), - DECORATIVE_MAGIC_ROBE_LEGS(ItemID.DECORATIVE_ARMOUR_11897), - DECORATIVE_RANGE_TOP(ItemID.DECORATIVE_ARMOUR_11899), - DECORATIVE_RANGE_BOTTOM(ItemID.DECORATIVE_ARMOUR_11900), - DECORATIVE_RANGE_QUIVER(ItemID.DECORATIVE_ARMOUR_11901), - GOLD_DECORATIVE_HELM(ItemID.DECORATIVE_HELM_4511), - GOLD_DECORATIVE_BODY(ItemID.DECORATIVE_ARMOUR_4509), - GOLD_DECORATIVE_LEGS(ItemID.DECORATIVE_ARMOUR_4510), - GOLD_DECORATIVE_SKIRT(ItemID.DECORATIVE_ARMOUR_11895), - GOLD_DECORATIVE_SHIELD(ItemID.DECORATIVE_SHIELD_4512), - GOLD_DECORATIVE_SWORD(ItemID.DECORATIVE_SWORD_4508); + SARADOMIN_HALO(ItemID.SARADOMIN_HALO, 25000), + ZAMORAK_HALO(ItemID.ZAMORAK_HALO, 25000), + GUTHIX_HALO(ItemID.GUTHIX_HALO, 25000), + DECORATIVE_MAGIC_HAT(ItemID.DECORATIVE_ARMOUR_11898, 5000), + DECORATIVE_MAGIC_ROBE_TOP(ItemID.DECORATIVE_ARMOUR_11896, 5000), + DECORATIVE_MAGIC_ROBE_LEGS(ItemID.DECORATIVE_ARMOUR_11897, 5000), + DECORATIVE_RANGE_TOP(ItemID.DECORATIVE_ARMOUR_11899, 5000), + DECORATIVE_RANGE_BOTTOM(ItemID.DECORATIVE_ARMOUR_11900, 5000), + DECORATIVE_RANGE_QUIVER(ItemID.DECORATIVE_ARMOUR_11901, 5000), + GOLD_DECORATIVE_HELM(ItemID.DECORATIVE_HELM_4511, 5000), + GOLD_DECORATIVE_BODY(ItemID.DECORATIVE_ARMOUR_4509, 5000), + GOLD_DECORATIVE_LEGS(ItemID.DECORATIVE_ARMOUR_4510, 5000), + GOLD_DECORATIVE_SKIRT(ItemID.DECORATIVE_ARMOUR_11895, 5000), + GOLD_DECORATIVE_SHIELD(ItemID.DECORATIVE_SHIELD_4512, 5000), + GOLD_DECORATIVE_SWORD(ItemID.DECORATIVE_SWORD_4508, 5000); private final int itemID; + private final int repairPrice; - private static final ImmutableSet ID_SET; + private static final ImmutableMap REPAIR_MAP; static { - final ImmutableSet.Builder set = new ImmutableSet.Builder<>(); + final ImmutableMap.Builder map = new ImmutableMap.Builder<>(); for (final BrokenOnDeathItem p : values()) { - set.add(p.itemID); + map.put(p.itemID, p.repairPrice); } - ID_SET = set.build(); + REPAIR_MAP = map.build(); } - static boolean isBrokenOnDeath(final int itemID) + @Nullable + static Integer getRepairPrice(int itemId) { - return ID_SET.contains(itemID); + return REPAIR_MAP.get(itemId); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPlugin.java index 05089bc898..8a6e1791a7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPlugin.java @@ -338,7 +338,7 @@ public class ItemsKeptOnDeathPlugin extends Plugin if (!Pets.isPet(id) && !LostIfNotProtected.isLostIfNotProtected(id) && !isTradeable(itemManager.getItemComposition(id)) && wildyLevel <= DEEP_WILDY - && (wildyLevel <= 0 || BrokenOnDeathItem.isBrokenOnDeath(i.getId()))) + && (wildyLevel <= 0 || BrokenOnDeathItem.getRepairPrice(i.getId()) != null)) { keptItems.add(new ItemStack(id, qty)); } @@ -442,19 +442,29 @@ public class ItemsKeptOnDeathPlugin extends Plugin // Grab base item price exchangePrice = itemManager.getItemPrice(fixedPrice.getBaseId(), true); } - else + + // Jagex uses the repair price when determining which items are kept on death. + final Integer repairPrice = BrokenOnDeathItem.getRepairPrice(canonicalizedItemId); + if (repairPrice != null) { - // Account for items whose death value comes from their tradeable variant (barrows) or components (ornate kits) - for (final int mappedID : ItemMapping.map(canonicalizedItemId)) - { - exchangePrice += itemManager.getItemPrice(mappedID, true); - } + exchangePrice = repairPrice; } if (exchangePrice == 0) { - final ItemComposition c1 = itemManager.getItemComposition(canonicalizedItemId); - exchangePrice = c1.getPrice(); + // Account for items whose death value comes from their tradeable variant (barrows) or components (ornate kits) + // ItemMapping.map will always return a collection with at least the passed ID + for (final int mappedID : ItemMapping.map(canonicalizedItemId)) + { + exchangePrice += itemManager.getItemPrice(mappedID, true); + } + + // If for some reason it still has no price default to the items store price + if (exchangePrice == 0) + { + final ItemComposition c1 = itemManager.getItemComposition(canonicalizedItemId); + exchangePrice = c1.getPrice(); + } } // Apply fixed price offset diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPluginTest.java index 37e8a7d99d..ed697b3b74 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/itemskeptondeath/ItemsKeptOnDeathPluginTest.java @@ -613,4 +613,24 @@ public class ItemsKeptOnDeathPluginTest final List kept = deathItems.getKeptItems(); assertTrue(kept.contains(new ItemStack(ItemID.SHADOW_SWORD, 1))); } + + @Test + public void brokenOnDeathTestRepairPrice() + { + // Dragon defender price should actually be pulled from BrokenOnDeathItem, and be lost on death + final Item[] inv = new Item[] + { + mItem(ItemID.BARROWS_GLOVES, 1, "Barrows gloves", false, 130000), + mItem(ItemID.DRAGON_DEFENDER, 1, "Dragon defender", false, 68007), + mItem(ItemID.DRAGON_SCIMITAR, 1, "Dragon scimitar", true, 63123), + mItem(ItemID.HELM_OF_NEITIZNOT, 1, "Helm of neitiznot", true, 45519), + }; + + plugin.wildyLevel = 21; + + final DeathItems deathItems = plugin.calculateKeptLostItems(inv, new Item[0]); + + final List lost = deathItems.getLostItems(); + assertTrue(lost.contains(new ItemStack(ItemID.DRAGON_DEFENDER, 1))); + } } From c7f8b6c6e1253937e0e8f3552c2c436248d9a60e Mon Sep 17 00:00:00 2001 From: 15987632 Date: Tue, 6 Aug 2019 20:18:48 -0400 Subject: [PATCH 03/26] hot cold clues: center northern blast mine dig location --- .../plugins/cluescrolls/clues/hotcold/HotColdLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 590cc58bd2..4207fd45f1 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 @@ -157,7 +157,7 @@ public enum HotColdLocation WILDERNESS_49(new WorldPoint(3140, 3910, 0), WILDERNESS, "South-west of the Deserted Keep, level 49 Wilderness."), WILDERNESS_54(new WorldPoint(2983, 3946, 0), WILDERNESS, "West of the Wilderness Agility Course, level 54 Wilderness."), ZEAH_BLASTMINE_BANK(new WorldPoint(1507, 3856, 0), ZEAH, "Next to the bank in the Lovakengj blast mine."), - ZEAH_BLASTMINE_NORTH(new WorldPoint(1490, 3883, 0), ZEAH, "Northern part of the Lovakengj blast mine."), + ZEAH_BLASTMINE_NORTH(new WorldPoint(1488, 3881, 0), ZEAH, "Northern part of the Lovakengj blast mine."), ZEAH_LOVAKITE_FURNACE(new WorldPoint(1507, 3819, 0), ZEAH, "Next to the lovakite furnace in Lovakengj."), ZEAH_LOVAKENGJ_MINE(new WorldPoint(1477, 3779, 0), ZEAH, "Next to mithril rock in the Lovakengj mine."), ZEAH_SULPHR_MINE(new WorldPoint(1428, 3866, 0), ZEAH, "Western entrance in the Lovakengj sulphur mine."), From 535eef858397b979a2035bb6c4deecd818bcfbf9 Mon Sep 17 00:00:00 2001 From: 15987632 Date: Tue, 6 Aug 2019 21:18:23 -0400 Subject: [PATCH 04/26] hot cold clues: center eastern part of piscatoris hunter area dig location --- .../plugins/cluescrolls/clues/hotcold/HotColdLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4207fd45f1..49515a9657 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 @@ -138,7 +138,7 @@ public enum HotColdLocation NORTHEAST_OF_AL_KHARID_MINE(true, new WorldPoint(3332, 3313, 0), MISTHALIN, "Northeast of Al Kharid Mine"), WESTERN_PROVINCE_EAGLES_PEAK(new WorldPoint(2297, 3530, 0), WESTERN_PROVINCE, "North-west of Eagles' Peak."), WESTERN_PROVINCE_PISCATORIS(new WorldPoint(2337, 3689, 0), WESTERN_PROVINCE, "Piscatoris Fishing Colony"), - WESTERN_PROVINCE_PISCATORIS_HUNTER_AREA(new WorldPoint(2361, 3566, 0), WESTERN_PROVINCE, "Eastern part of Piscatoris Hunter area, south-west of the Falconry."), + WESTERN_PROVINCE_PISCATORIS_HUNTER_AREA(new WorldPoint(2359, 3564, 0), WESTERN_PROVINCE, "Eastern part of Piscatoris Hunter area, south-west of the Falconry."), WESTERN_PROVINCE_ARANDAR(new WorldPoint(2366, 3318, 0), WESTERN_PROVINCE, "South-west of the crystal gate to Arandar."), WESTERN_PROVINCE_ELF_CAMP_EAST(new WorldPoint(2270, 3244, 0), WESTERN_PROVINCE, "East of Elf Camp."), WESTERN_PROVINCE_ELF_CAMP_NW(new WorldPoint(2174, 3280, 0), WESTERN_PROVINCE, "North-west of Elf Camp."), From 1c6333410ac3f9c6f97d7a40fc0b0bbe599d5e5e Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 6 Aug 2019 21:36:04 -0700 Subject: [PATCH 05/26] hotcold: Center level 5 wilderness location Ref: runelite/runelite#9601 --- .../plugins/cluescrolls/clues/hotcold/HotColdLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 590cc58bd2..0b5cb9f5e5 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 @@ -145,7 +145,7 @@ public enum HotColdLocation WESTERN_PROVINCE_LLETYA(new WorldPoint(2335, 3166, 0), WESTERN_PROVINCE, "In Lletya."), WESTERN_PROVINCE_TYRAS(new WorldPoint(2204, 3157, 0), WESTERN_PROVINCE, "Near Tyras Camp."), WESTERN_PROVINCE_ZULANDRA(new WorldPoint(2196, 3057, 0), WESTERN_PROVINCE, "The northern house at Zul-Andra."), - WILDERNESS_5(new WorldPoint(3169, 3558, 0), WILDERNESS, "North of the Grand Exchange, level 5 Wilderness."), + WILDERNESS_5(new WorldPoint(3173, 3556, 0), WILDERNESS, "North of the Grand Exchange, level 5 Wilderness."), WILDERNESS_12(new WorldPoint(3038, 3612, 0), WILDERNESS, "South-east of the Dark Warriors' Fortress, level 12 Wilderness."), WILDERNESS_20(new WorldPoint(3225, 3676, 0), WILDERNESS, "East of the Corporeal Beast's lair, level 20 Wilderness."), WILDERNESS_27(new WorldPoint(3174, 3735, 0), WILDERNESS, "Inside the Ruins north of the Graveyard of Shadows, level 27 Wilderness."), From e0d1f408ccfe8cb5de99c3a28106f4a719f0e9df Mon Sep 17 00:00:00 2001 From: trimbe Date: Thu, 8 Aug 2019 13:21:09 -0400 Subject: [PATCH 06/26] hot cold: center 'west of farming guild' location --- .../plugins/cluescrolls/clues/hotcold/HotColdLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 590cc58bd2..cdd825c062 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 @@ -177,7 +177,7 @@ public enum HotColdLocation ZEAH_MESS_HALL(new WorldPoint(1658, 3621, 0), ZEAH, "East of the Mess hall."), ZEAH_WATSONS_HOUSE(new WorldPoint(1653, 3573, 0), ZEAH, "East of Watson's house."), ZEAH_VANNAHS_FARM_STORE(new WorldPoint(1806, 3521, 0), ZEAH, "North of Vannah's Farm Store, between the chicken coop and willow trees."), - ZEAH_FARMING_GUILD_W(new WorldPoint(1209, 3737, 0), ZEAH, "West of the Farming Guild."), + ZEAH_FARMING_GUILD_W(new WorldPoint(1208, 3736, 0), ZEAH, "West of the Farming Guild."), ZEAH_DAIRY_COW(new WorldPoint(1320, 3718, 0), ZEAH, "North-east of the Kebos Lowlands, east of the dairy cow."), ZEAH_CRIMSON_SWIFTS(new WorldPoint(1186, 3583, 0), ZEAH, "South-west of the Kebos Swamp, below the crimson swifts."); From 76dfd6232ed3e22d8e8548278f24560d1053eb93 Mon Sep 17 00:00:00 2001 From: trimbe Date: Tue, 7 May 2019 21:08:22 -0400 Subject: [PATCH 07/26] world map: correct canvas bounds location and clip tooltips properly --- .../client/ui/overlay/worldmap/WorldMapOverlay.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java index 6b5b7474a6..a8621770a2 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java @@ -91,9 +91,7 @@ public class WorldMapOverlay extends Overlay final Rectangle worldMapRectangle = widget.getBounds(); final Area mapViewArea = getWorldMapClipArea(worldMapRectangle); - final Rectangle canvasBounds = client.getCanvas().getBounds(); - // in fixed, the bounds are offset by the size of the black borders outside the canvas - canvasBounds.setLocation(0, 0); + final Rectangle canvasBounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight()); final Area canvasViewArea = getWorldMapClipArea(canvasBounds); Area currentClip = null; @@ -264,7 +262,9 @@ public class WorldMapOverlay extends Overlay drawPoint = new Point(drawPoint.getX() + TOOLTIP_OFFSET_WIDTH, drawPoint.getY() + TOOLTIP_OFFSET_HEIGHT); - graphics.setClip(client.getCanvas().getBounds()); + final Rectangle bounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight()); + final Area mapArea = getWorldMapClipArea(bounds); + graphics.setClip(mapArea); graphics.setColor(JagexColors.TOOLTIP_BACKGROUND); graphics.setFont(FontManager.getRunescapeFont()); FontMetrics fm = graphics.getFontMetrics(); From 3e277a503930dd6c05cd1309ac80b6fd5171589d Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Mon, 12 Aug 2019 01:43:47 -0700 Subject: [PATCH 08/26] cluescrolls: Add the new General Hining cryptic clue (#9613) --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index 1eff8ac264..a3806bca17 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -320,7 +320,8 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the boxes next to a chest that needs a crystal key.", BOXES_360, new WorldPoint(2915, 3452, 0), "The Crystal chest can be found in the house directly south of the Witch's house in Taverley."), new CrypticClue("Talk to Turael in Burthorpe.", "Turael", new WorldPoint(2930, 3536, 0), "Turael is located in the small house east of the Toad and Chicken inn."), new CrypticClue("More resources than I can handle, but in a very dangerous area. Can't wait to strike gold!", new WorldPoint(3183, 3941, 0), "Dig between the three gold ores in the Wilderness Resource Area."), - new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)") + new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)"), + new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp.") ); private final String text; From a5a0e2645821691bb6e8496620a322754af127bc Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 13:38:38 -0400 Subject: [PATCH 09/26] clues: add RUE GO anagram --- .../runelite/client/plugins/cluescrolls/clues/AnagramClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java index 3023754e35..27391e39bf 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java @@ -163,7 +163,8 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc new AnagramClue("RUG DETER", "Gertrude", new WorldPoint(3151, 3412, 0), "West of Varrock, south of the Cooks' Guild"), new AnagramClue("SIR SHARE RED", "Hairdresser", new WorldPoint(2944, 3381, 0), "Western Falador"), new AnagramClue("TAUNT ROOF", "Fortunato", new WorldPoint(3080, 3250, 0), "Draynor Village Market"), - new AnagramClue("HICK JET", "Jethick", new WorldPoint(2541, 3305, 0), "West Ardougne", "38") + new AnagramClue("HICK JET", "Jethick", new WorldPoint(2541, 3305, 0), "West Ardougne", "38"), + new AnagramClue("RUE GO", "Goreu", new WorldPoint(2335, 3162, 0), "Lletya") ); private final String text; From 068071997200bfb5d4fc91c1ad96169110141163 Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 13:40:06 -0400 Subject: [PATCH 10/26] clues: add Lady Trahaearn cryptic --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index a3806bca17..e66cbcabea 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -321,7 +321,8 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Talk to Turael in Burthorpe.", "Turael", new WorldPoint(2930, 3536, 0), "Turael is located in the small house east of the Toad and Chicken inn."), new CrypticClue("More resources than I can handle, but in a very dangerous area. Can't wait to strike gold!", new WorldPoint(3183, 3941, 0), "Dig between the three gold ores in the Wilderness Resource Area."), new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)"), - new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp.") + new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp."), + new CrypticClue("Has no one told you it is rude to ask a lady her age?", "Lady Tangwen Trahaearn", new WorldPoint(3280, 6042, 0), "Talk to Lady Tangwen Trahaearn, SSE Prifddinas by the teleporter.") ); private final String text; From 94cbf355e0accceec4f93d55d1be6cafdedd58df Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 13:40:37 -0400 Subject: [PATCH 11/26] clues: add elvish onions cryptic --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index e66cbcabea..cbdb61b72d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -322,7 +322,8 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("More resources than I can handle, but in a very dangerous area. Can't wait to strike gold!", new WorldPoint(3183, 3941, 0), "Dig between the three gold ores in the Wilderness Resource Area."), new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)"), new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp."), - new CrypticClue("Has no one told you it is rude to ask a lady her age?", "Lady Tangwen Trahaearn", new WorldPoint(3280, 6042, 0), "Talk to Lady Tangwen Trahaearn, SSE Prifddinas by the teleporter.") + new CrypticClue("Has no one told you it is rude to ask a lady her age?", "Lady Tangwen Trahaearn", new WorldPoint(3280, 6042, 0), "Talk to Lady Tangwen Trahaearn, SSE Prifddinas by the teleporter."), + new CrypticClue("Elvish onions.", new WorldPoint(3303, 6092, 0), "Dig in the onion patch east of the Prifddinas allotments.") ); private final String text; From fadb7420a561675287bc15e81f8ec6d1a9b52678 Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 14:08:40 -0400 Subject: [PATCH 12/26] clues: update bow near Lord Iorwerth emote --- .../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 4337f5d017..8bedf743fd 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 @@ -80,7 +80,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Beckon in the Digsite, near the eastern winch. Bow before you talk to me. Equip a green gnome hat, snakeskin boots and an iron pickaxe.", "Digsite", DIGSITE, new WorldPoint(3370, 3425, 0), BECKON, BOW, item(GREEN_HAT), item(SNAKESKIN_BOOTS), item(IRON_PICKAXE)), new EmoteClue("Beckon in Tai Bwo Wannai. Clap before you talk to me. Equip green dragonhide chaps, a ring of dueling and a mithril medium helmet.", "Tai Bwo Wannai", SOUTH_OF_THE_SHRINE_IN_TAI_BWO_WANNAI_VILLAGE, new WorldPoint(2803, 3073, 0), BECKON, CLAP, item(GREEN_DHIDE_CHAPS), any("Ring of dueling", item(RING_OF_DUELING1), item(RING_OF_DUELING2), item(RING_OF_DUELING3), item(RING_OF_DUELING4), item(RING_OF_DUELING5), item(RING_OF_DUELING6), item(RING_OF_DUELING7), item(RING_OF_DUELING8)), item(MITHRIL_MED_HELM)), new EmoteClue("Beckon in the combat ring of Shayzien. Show your anger before you talk to me. Equip an adamant platebody, adamant full helm and adamant platelegs.", "Shayzien combat ring", WEST_OF_THE_SHAYZIEN_COMBAT_RING, new WorldPoint(1545, 3594, 0), BECKON, ANGRY, item(ADAMANT_PLATELEGS), item(ADAMANT_PLATEBODY), item(ADAMANT_FULL_HELM)), - new EmoteClue("Bow near Lord Iorwerth. Beware of double agents! Equip a new imbued crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), BOW, any("Imbued crystal bow", item(NEW_CRYSTAL_BOW_I), item(CRYSTAL_BOW_FULL_I), item(CRYSTAL_BOW_910_I), item(CRYSTAL_BOW_810_I), item(CRYSTAL_BOW_710_I), item(CRYSTAL_BOW_610_I), item(CRYSTAL_BOW_510_I), item(CRYSTAL_BOW_410_I), item(CRYSTAL_BOW_310_I), item(CRYSTAL_BOW_210_I), item(CRYSTAL_BOW_110_I))), + new EmoteClue("Bow near Lord Iorwerth. Beware of double agents! Equip a charged crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), BOW, any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))), new EmoteClue("Bow outside the entrance to the Legends' Guild. Equip iron platelegs, an emerald amulet and an oak longbow.", "Legend's Guild", OUTSIDE_THE_LEGENDS_GUILD_GATES, new WorldPoint(2729, 3349, 0), BOW, item(IRON_PLATELEGS), item(OAK_LONGBOW), item(EMERALD_AMULET)), new EmoteClue("Bow on the ground floor of the Legend's guild. Equip Legend's cape, a dragon battleaxe and an amulet of glory.", "Legend's Guild", OUTSIDE_THE_LEGENDS_GUILD_DOOR, new WorldPoint(2728, 3377, 0), BOW, item(CAPE_OF_LEGENDS), item(DRAGON_BATTLEAXE), any("Any amulet of glory", item(AMULET_OF_GLORY), item(AMULET_OF_GLORY1), item(AMULET_OF_GLORY2), item(AMULET_OF_GLORY3), item(AMULET_OF_GLORY4), item(AMULET_OF_GLORY5), item(AMULET_OF_GLORY6))), new EmoteClue("Bow in the ticket office of the Duel Arena. Equip an iron chain body, leather chaps and coif.", "Duel Arena", MUBARIZS_ROOM_AT_THE_DUEL_ARENA, new WorldPoint(3314, 3241, 0), BOW, item(IRON_CHAINBODY), item(LEATHER_CHAPS), item(COIF)), From bd1158f96e76d265439e1261d24eeb9bef9a8b87 Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 14:09:34 -0400 Subject: [PATCH 13/26] clues: add bow in the Iorwerth camp emote --- .../net/runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 1 + 1 file changed, 1 insertion(+) 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 8bedf743fd..fc0c9e0a2d 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 @@ -81,6 +81,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Beckon in Tai Bwo Wannai. Clap before you talk to me. Equip green dragonhide chaps, a ring of dueling and a mithril medium helmet.", "Tai Bwo Wannai", SOUTH_OF_THE_SHRINE_IN_TAI_BWO_WANNAI_VILLAGE, new WorldPoint(2803, 3073, 0), BECKON, CLAP, item(GREEN_DHIDE_CHAPS), any("Ring of dueling", item(RING_OF_DUELING1), item(RING_OF_DUELING2), item(RING_OF_DUELING3), item(RING_OF_DUELING4), item(RING_OF_DUELING5), item(RING_OF_DUELING6), item(RING_OF_DUELING7), item(RING_OF_DUELING8)), item(MITHRIL_MED_HELM)), new EmoteClue("Beckon in the combat ring of Shayzien. Show your anger before you talk to me. Equip an adamant platebody, adamant full helm and adamant platelegs.", "Shayzien combat ring", WEST_OF_THE_SHAYZIEN_COMBAT_RING, new WorldPoint(1545, 3594, 0), BECKON, ANGRY, item(ADAMANT_PLATELEGS), item(ADAMANT_PLATEBODY), item(ADAMANT_FULL_HELM)), new EmoteClue("Bow near Lord Iorwerth. Beware of double agents! Equip a charged crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), BOW, any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))), + new EmoteClue("Bow in the Iorwerth Camp. Beware of double agents! Equip a charged crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), BOW, any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))), new EmoteClue("Bow outside the entrance to the Legends' Guild. Equip iron platelegs, an emerald amulet and an oak longbow.", "Legend's Guild", OUTSIDE_THE_LEGENDS_GUILD_GATES, new WorldPoint(2729, 3349, 0), BOW, item(IRON_PLATELEGS), item(OAK_LONGBOW), item(EMERALD_AMULET)), new EmoteClue("Bow on the ground floor of the Legend's guild. Equip Legend's cape, a dragon battleaxe and an amulet of glory.", "Legend's Guild", OUTSIDE_THE_LEGENDS_GUILD_DOOR, new WorldPoint(2728, 3377, 0), BOW, item(CAPE_OF_LEGENDS), item(DRAGON_BATTLEAXE), any("Any amulet of glory", item(AMULET_OF_GLORY), item(AMULET_OF_GLORY1), item(AMULET_OF_GLORY2), item(AMULET_OF_GLORY3), item(AMULET_OF_GLORY4), item(AMULET_OF_GLORY5), item(AMULET_OF_GLORY6))), new EmoteClue("Bow in the ticket office of the Duel Arena. Equip an iron chain body, leather chaps and coif.", "Duel Arena", MUBARIZS_ROOM_AT_THE_DUEL_ARENA, new WorldPoint(3314, 3241, 0), BOW, item(IRON_CHAINBODY), item(LEATHER_CHAPS), item(COIF)), From 7213e1f83ebe4f397c1bd74409566c7d84a2f078 Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 14:10:39 -0400 Subject: [PATCH 14/26] clues: add beckon by crystalline maple trees emote --- .../runelite/client/plugins/cluescrolls/clues/EmoteClue.java | 1 + .../client/plugins/cluescrolls/clues/emote/STASHUnit.java | 3 ++- 2 files changed, 3 insertions(+), 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 fc0c9e0a2d..cc5df5a7ee 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 @@ -77,6 +77,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu new EmoteClue("Panic in the heart of the Haunted Woods. Beware of double agents! Have no items equipped when you do.", "Haunted Woods", null, new WorldPoint(3611, 3492, 0), PANIC, emptySlot("Nothing at all", HEAD, CAPE, AMULET, WEAPON, BODY, SHIELD, LEGS, GLOVES, BOOTS, RING, AMMO)), new EmoteClue("Show your anger towards the Statue of Saradomin in Ellamaria's garden. Beware of double agents! Equip a zamorak godsword.", "Varrock Castle", BY_THE_BEAR_CAGE_IN_VARROCK_PALACE_GARDENS, new WorldPoint(3230, 3478, 0), ANGRY, item(ZAMORAK_GODSWORD)), new EmoteClue("Show your anger at the Wise old man. Beware of double agents! Equip an abyssal whip, a legend's cape and some spined chaps.", "Draynor Village", BEHIND_MISS_SCHISM_IN_DRAYNOR_VILLAGE, new WorldPoint(3088, 3254, 0), ANGRY, any("Abyssal whip", item(ABYSSAL_WHIP), item(VOLCANIC_ABYSSAL_WHIP), item(FROZEN_ABYSSAL_WHIP)), item(CAPE_OF_LEGENDS), item(SPINED_CHAPS)), + new EmoteClue("Beckon by a collection of crystalline maple trees. Beware of double agents! Equip Bryophyta's staff and a nature tiara.", "North of Prifddinas", CRYSTALLINE_MAPLE_TREES, new WorldPoint(2211, 3427, 0), BECKON, range(BRYOPHYTAS_STAFF_UNCHARGED, BRYOPHYTAS_STAFF), item(NATURE_TIARA)), new EmoteClue("Beckon in the Digsite, near the eastern winch. Bow before you talk to me. Equip a green gnome hat, snakeskin boots and an iron pickaxe.", "Digsite", DIGSITE, new WorldPoint(3370, 3425, 0), BECKON, BOW, item(GREEN_HAT), item(SNAKESKIN_BOOTS), item(IRON_PICKAXE)), new EmoteClue("Beckon in Tai Bwo Wannai. Clap before you talk to me. Equip green dragonhide chaps, a ring of dueling and a mithril medium helmet.", "Tai Bwo Wannai", SOUTH_OF_THE_SHRINE_IN_TAI_BWO_WANNAI_VILLAGE, new WorldPoint(2803, 3073, 0), BECKON, CLAP, item(GREEN_DHIDE_CHAPS), any("Ring of dueling", item(RING_OF_DUELING1), item(RING_OF_DUELING2), item(RING_OF_DUELING3), item(RING_OF_DUELING4), item(RING_OF_DUELING5), item(RING_OF_DUELING6), item(RING_OF_DUELING7), item(RING_OF_DUELING8)), item(MITHRIL_MED_HELM)), new EmoteClue("Beckon in the combat ring of Shayzien. Show your anger before you talk to me. Equip an adamant platebody, adamant full helm and adamant platelegs.", "Shayzien combat ring", WEST_OF_THE_SHAYZIEN_COMBAT_RING, new WorldPoint(1545, 3594, 0), BECKON, ANGRY, item(ADAMANT_PLATELEGS), item(ADAMANT_PLATEBODY), item(ADAMANT_FULL_HELM)), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java index bf66bcefb1..1a4e5eb2b5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/emote/STASHUnit.java @@ -137,7 +137,8 @@ public enum STASHUnit NORTH_OF_MOUNT_KARUULM(NullObjectID.NULL_34647, new WorldPoint(1308, 3840, 0)), GYPSY_TENT_ENTRANCE(NullObjectID.NULL_34736, new WorldPoint(3206, 3422, 0)), FINE_CLOTHES_ENTRANCE(NullObjectID.NULL_34737, new WorldPoint(3209, 3416, 0)), - BOB_AXES_ENTRANCE(NullObjectID.NULL_34738, new WorldPoint(3233, 3200, 0)); + BOB_AXES_ENTRANCE(NullObjectID.NULL_34738, new WorldPoint(3233, 3200, 0)), + CRYSTALLINE_MAPLE_TREES(NullObjectID.NULL_34953, new WorldPoint(2213, 3427, 0)); private final int objectId; private final WorldPoint[] worldPoints; From 86f0c5ebd277dd743790a25a37126341de3b5f8f Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 12 Aug 2019 17:02:37 -0400 Subject: [PATCH 15/26] osbuddy client: update exchange summary location --- .../java/net/runelite/http/service/osbuddy/OsbuddyClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java b/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java index dadb635a4d..390de3ff43 100644 --- a/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java +++ b/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java @@ -43,8 +43,8 @@ public class OsbuddyClient { HttpUrl httpUrl = new HttpUrl.Builder() .scheme("https") - .host("rsbuddy.com") - .addPathSegment("exchange") + .host("storage.googleapis.com") + .addPathSegment("osb-exchange") .addPathSegment("summary.json") .build(); From d77134893a0a9b7e043790e1ccca97564ecc82f8 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 12 Aug 2019 17:04:55 -0400 Subject: [PATCH 16/26] osbuddy client: set UA to RuneLite --- .../java/net/runelite/http/service/osbuddy/OsbuddyClient.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java b/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java index 390de3ff43..585577511a 100644 --- a/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java +++ b/http-service/src/main/java/net/runelite/http/service/osbuddy/OsbuddyClient.java @@ -37,8 +37,6 @@ import okhttp3.Response; public class OsbuddyClient { - private static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36"; - public Map getSummary() throws IOException { HttpUrl httpUrl = new HttpUrl.Builder() @@ -50,7 +48,7 @@ public class OsbuddyClient Request request = new Request.Builder() .url(httpUrl) - .header("User-Agent", USER_AGENT) + .header("User-Agent", "RuneLite") .build(); try (Response responseOk = RuneLiteAPI.CLIENT.newCall(request).execute()) From 2af3b47455eb47bc64b089c9ae7cf2228789cc68 Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Mon, 12 Aug 2019 17:19:31 -0400 Subject: [PATCH 17/26] slayer plugin: add Sarachnis task --- .../src/main/java/net/runelite/client/plugins/slayer/Task.java | 1 + 1 file changed, 1 insertion(+) 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 716711af23..a85812e723 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 @@ -145,6 +145,7 @@ enum Task 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), 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"), From 9a35a04ca0b255a0f84f5264c9c77e235715ff22 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Mon, 12 Aug 2019 02:41:21 +0100 Subject: [PATCH 18/26] Add new crystal equipment IDs to the Item Mapping --- .../src/main/java/net/runelite/client/game/ItemMapping.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java index 62e942744c..7e2ed45398 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java @@ -223,9 +223,9 @@ public enum ItemMapping ITEM_CRYSTAL_HARPOON(DRAGON_HARPOON, CRYSTAL_HARPOON, CRYSTAL_HARPOON_INACTIVE), ITEM_CRYSTAL_PICKAXE(DRAGON_PICKAXE, CRYSTAL_PICKAXE, CRYSTAL_PICKAXE_INACTIVE), ITEM_BLADE_OF_SAELDOR(BLADE_OF_SAELDOR_INACTIVE, BLADE_OF_SAELDOR), - ITEM_CRYSTAL_BOW(CRYSTAL_WEAPON_SEED, CRYSTAL_BOW, CRYSTAL_BOW_INACTIVE), - ITEM_CRYSTAL_HALBERD(CRYSTAL_WEAPON_SEED, CRYSTAL_HALBERD, CRYSTAL_HALBERD_INACTIVE), - ITEM_CRYSTAL_SHIELD(CRYSTAL_WEAPON_SEED, CRYSTAL_SHIELD, CRYSTAL_SHIELD_INACTIVE); + ITEM_CRYSTAL_BOW(CRYSTAL_WEAPON_SEED, CRYSTAL_BOW, CRYSTAL_BOW_24123, CRYSTAL_BOW_INACTIVE), + ITEM_CRYSTAL_HALBERD(CRYSTAL_WEAPON_SEED, CRYSTAL_HALBERD, CRYSTAL_HALBERD_24125, CRYSTAL_HALBERD_INACTIVE), + ITEM_CRYSTAL_SHIELD(CRYSTAL_WEAPON_SEED, CRYSTAL_SHIELD, CRYSTAL_SHIELD_24127, CRYSTAL_SHIELD_INACTIVE); private static final Multimap MAPPINGS = HashMultimap.create(); private final int tradeableItem; From e18acd6de9277b98ca3a4f7d494659b9b68af91c Mon Sep 17 00:00:00 2001 From: Ian Gibson Date: Mon, 12 Aug 2019 17:49:20 -0400 Subject: [PATCH 19/26] clue plugin: update Monk camp clue location --- .../runelite/client/plugins/cluescrolls/clues/CrypticClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java index a3806bca17..f2d845e0d5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CrypticClue.java @@ -255,7 +255,7 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc new CrypticClue("Search the chests upstairs in Al Kharid Palace.", CLOSED_CHEST_375, new WorldPoint(3301, 3169, 1), "The chest is located, in the northeast corner, on the first floor of the Al Kharid Palace"), new CrypticClue("Search the boxes just outside the Armour shop in East Ardougne.", BOXES_361, new WorldPoint(2654, 3299, 0), "Outside Zenesha's Plate Mail Body Shop"), new CrypticClue("Surrounded by white walls and gems.", "Herquin", new WorldPoint(2945, 3335, 0), "Talk to Herquin, the gem store owner in Falador."), - new CrypticClue("Monk's residence in the far west. See robe storage device.", DRAWERS_350, new WorldPoint(1742, 3490, 1), "Search the drawers upstairs in the chapel found on the southern coast of Hosidius, directly south of the player-owned house portal."), + new CrypticClue("Monk's residence in the far west. See robe storage device.", DRAWERS_350, new WorldPoint(1742, 3490, 1), "Search the drawers in the south tent of the monk's camp on the southern coast of Hosidius, directly south of the player-owned house portal."), new CrypticClue("Search the drawers in Catherby's Archery shop.", DRAWERS_350, new WorldPoint(2825, 3442, 0), "Hickton's Archery Emporium in Catherby."), new CrypticClue("The hand ain't listening.", "The Face", new WorldPoint(3019, 3232, 0), "Talk to The Face located by the manhole just north of the Port Sarim fishing shop."), new CrypticClue("Search the chest in the left-hand tower of Camelot Castle.", CLOSED_CHEST_25592, new WorldPoint(2748, 3495, 2), "Located on the second floor of the western tower of Camelot."), From d1193a78ff4eb139cb00a4f1a2e2974f4b1969ef Mon Sep 17 00:00:00 2001 From: Krysa <46086365+Krysaczek@users.noreply.github.com> Date: Mon, 12 Aug 2019 23:54:27 +0200 Subject: [PATCH 20/26] agility shotcuts: add Isafdar tripwire --- .../src/main/java/net/runelite/client/game/AgilityShortcut.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java index 18ecce9f0d..5e7ea1b1f5 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java +++ b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java @@ -140,7 +140,7 @@ public enum AgilityShortcut MOTHERLODE_MINE_WALL_EAST(54, "Wall", new WorldPoint(3124, 9703, 0), DARK_TUNNEL_10047), MOTHERLODE_MINE_WALL_WEST(54, "Wall", new WorldPoint(3118, 9702, 0), DARK_TUNNEL_10047), MISCELLANIA_DOCK_STEPPING_STONE(55, "Stepping Stone", new WorldPoint(2572, 3862, 0), STEPPING_STONE_11768), - ISAFDAR_FOREST_OBSTACLES(56, "Trap", null, DENSE_FOREST_3938, DENSE_FOREST_3939, DENSE_FOREST_3998, DENSE_FOREST_3999, DENSE_FOREST, LEAVES, LEAVES_3924, LEAVES_3925, STICKS, TRIPWIRE), + ISAFDAR_FOREST_OBSTACLES(56, "Trap", null, DENSE_FOREST_3938, DENSE_FOREST_3939, DENSE_FOREST_3998, DENSE_FOREST_3999, DENSE_FOREST, LEAVES, LEAVES_3924, LEAVES_3925, STICKS, TRIPWIRE, TRIPWIRE_3921), RELEKKA_EAST_FENCE(57, "Fence", new WorldPoint(2688, 3697, 0), BROKEN_FENCE), YANILLE_DUNGEON_MONKEY_BARS(57, "Monkey Bars", null, MONKEYBARS_23567), PHASMATYS_ECTOPOOL_SHORTCUT(58, "Weathered Wall", null , WEATHERED_WALL, WEATHERED_WALL_16526), From 896e2eaeca724641fabb87505095e385a9b629ec Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Thu, 8 Aug 2019 16:35:50 -0400 Subject: [PATCH 21/26] agility: update prif last obstacle exp --- .../main/java/net/runelite/client/plugins/agility/Courses.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java index 09826ec3eb..25ecc80b6f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java @@ -46,7 +46,7 @@ enum Courses SEERS(570.0, 435, 10806), POLLNIVNEACH(890.0, 540, 13358), RELLEKA(780.0, 475, 10553), - PRIFDDINAS(1199.0, 968, 12895), + PRIFDDINAS(1199.0, 1037, 12895), ARDOUGNE(793.0, 529, 10547); private final static Map coursesByRegion; From 3a883f5c313bb2d5134225bdfe359129d4dd55bc Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Thu, 8 Aug 2019 16:36:09 -0400 Subject: [PATCH 22/26] agility: update prif whole course exp --- .../main/java/net/runelite/client/plugins/agility/Courses.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java index 25ecc80b6f..339ba15f3c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/Courses.java @@ -46,7 +46,7 @@ enum Courses SEERS(570.0, 435, 10806), POLLNIVNEACH(890.0, 540, 13358), RELLEKA(780.0, 475, 10553), - PRIFDDINAS(1199.0, 1037, 12895), + PRIFDDINAS(1337.0, 1037, 12895), ARDOUGNE(793.0, 529, 10547); private final static Map coursesByRegion; From 98fc599e15bcdc49b5dbabbe4d4cdcbab97b71ee Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Thu, 1 Aug 2019 16:34:03 -0400 Subject: [PATCH 23/26] skill calc: update prif course --- .../runelite/client/plugins/skillcalculator/skill_agility.json | 2 +- 1 file changed, 1 insertion(+), 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 b72b8d59e9..cc490c113f 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 @@ -82,7 +82,7 @@ "level": 75, "icon": 23962, "name": "Prifddinas Agility Course", - "xp": 1220 + "xp": 1337 }, { "level": 80, From f430381f089a7f2070f07a650d70d042799f54cc Mon Sep 17 00:00:00 2001 From: Alexsuperfly Date: Mon, 12 Aug 2019 14:14:14 -0400 Subject: [PATCH 24/26] clues: update Falo crystal bow items --- .../cluescrolls/clues/FaloTheBardClue.java | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) 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 ea4f23ba5c..8350483589 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 @@ -31,37 +31,9 @@ import java.util.List; import javax.annotation.Nonnull; import lombok.Getter; import net.runelite.api.Item; -import static net.runelite.api.ItemID.ARMADYL_HELMET; -import static net.runelite.api.ItemID.BARRELCHEST_ANCHOR; -import static net.runelite.api.ItemID.BARROWS_GLOVES; -import static net.runelite.api.ItemID.BASALT; -import static net.runelite.api.ItemID.BOOK_OF_BALANCE; -import static net.runelite.api.ItemID.BOOK_OF_DARKNESS; -import static net.runelite.api.ItemID.BOOK_OF_LAW; -import static net.runelite.api.ItemID.BOOK_OF_WAR; -import static net.runelite.api.ItemID.COOKING_GAUNTLETS; -import static net.runelite.api.ItemID.CRYSTAL_BOW_110; -import static net.runelite.api.ItemID.CRYSTAL_BOW_110_I; -import static net.runelite.api.ItemID.DRAGON_DEFENDER; -import static net.runelite.api.ItemID.DRAGON_SCIMITAR; -import static net.runelite.api.ItemID.FIGHTER_TORSO; -import static net.runelite.api.ItemID.GREENMANS_ALEM; -import static net.runelite.api.ItemID.HOLY_BOOK; -import static net.runelite.api.ItemID.INFERNAL_AXE; -import static net.runelite.api.ItemID.IVANDIS_FLAIL; -import static net.runelite.api.ItemID.LAVA_DRAGON_BONES; -import static net.runelite.api.ItemID.MARK_OF_GRACE; -import static net.runelite.api.ItemID.NEW_CRYSTAL_BOW; -import static net.runelite.api.ItemID.NEW_CRYSTAL_BOW_I; -import static net.runelite.api.ItemID.NUMULITE; -import static net.runelite.api.ItemID.ROD_OF_IVANDIS_1; -import static net.runelite.api.ItemID.ROD_OF_IVANDIS_10; -import static net.runelite.api.ItemID.RUNE_PLATEBODY; -import static net.runelite.api.ItemID.TZHAARKETOM; -import static net.runelite.api.ItemID.UNHOLY_BOOK; -import static net.runelite.api.ItemID.WARRIOR_GUILD_TOKEN; import net.runelite.api.NPC; import net.runelite.api.coords.WorldPoint; +import static net.runelite.api.ItemID.*; import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR; import net.runelite.client.plugins.cluescrolls.ClueScrollPlugin; import static net.runelite.client.plugins.cluescrolls.ClueScrollWorldOverlay.IMAGE_Z_OFFSET; @@ -80,7 +52,7 @@ public class FaloTheBardClue extends ClueScroll implements TextClueScroll, NpcCl private static final List CLUES = ImmutableList.of( new FaloTheBardClue("A blood red weapon, a strong curved sword, found on the island of primate lords.", item(DRAGON_SCIMITAR)), new FaloTheBardClue("A book that preaches of some great figure, lending strength, might and vigour.", any("Any god book (must be complete)", item(HOLY_BOOK), item(BOOK_OF_BALANCE), item(UNHOLY_BOOK), item(BOOK_OF_LAW), item(BOOK_OF_WAR), item(BOOK_OF_DARKNESS))), - new FaloTheBardClue("A bow of elven craft was made, it shimmers bright, but will soon fade.", any("Crystal Bow", range(NEW_CRYSTAL_BOW, CRYSTAL_BOW_110), range(NEW_CRYSTAL_BOW_I, CRYSTAL_BOW_110_I))), + new FaloTheBardClue("A bow of elven craft was made, it shimmers bright, but will soon fade.", any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))), new FaloTheBardClue("A fiery axe of great inferno, when you use it, you'll wonder where the logs go.", item(INFERNAL_AXE)), new FaloTheBardClue("A mark used to increase one's grace, found atop a seer's place.", item(MARK_OF_GRACE)), new FaloTheBardClue("A molten beast with fiery breath, you acquire these with its death.", item(LAVA_DRAGON_BONES)), From c2111810d835921339526c23f6bf55df990c51d7 Mon Sep 17 00:00:00 2001 From: dekvall Date: Tue, 13 Aug 2019 01:49:27 +0200 Subject: [PATCH 25/26] examine plugin: remove examine value for coins Removed the GE and HA price message when examining coins since it's redundant information. --- .../net/runelite/client/plugins/examine/ExaminePlugin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java index 2003808908..1383403d20 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java @@ -37,6 +37,7 @@ import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.Constants; import net.runelite.api.ItemComposition; +import net.runelite.api.ItemID; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.MenuOptionClicked; @@ -203,6 +204,12 @@ public class ExaminePlugin extends Plugin { final int itemId = pendingExamine.getId(); final int itemQuantity = pendingExamine.getQuantity(); + + if (itemId == ItemID.COINS_995) + { + return; + } + itemComposition = itemManager.getItemComposition(itemId); if (itemComposition != null) From ce4f90f6fa721b7013054277f6455868c1ad8c7c Mon Sep 17 00:00:00 2001 From: dekvall Date: Tue, 13 Aug 2019 01:55:05 +0200 Subject: [PATCH 26/26] mining plugin: fix respawn timers in misc and resource area Fix respawn timers for: - Adamant rocks in Wilderness Resource area - Coal rocks in Miscellania The doubled respawn rate of the adamant rocks is a possible Jagex bug as they are the only type of rock within the Wilderness resource area to do so. The coal rocks in Miscellania are mined for favour instead of ores and therefore have a shortened respawn time. --- .../client/plugins/mining/MiningPlugin.java | 14 +++----- .../runelite/client/plugins/mining/Rock.java | 33 ++++++++++++------- 2 files changed, 27 insertions(+), 20 deletions(-) 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 a401a5ca66..5ff4b1ff7f 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 @@ -62,7 +62,6 @@ import net.runelite.client.ui.overlay.OverlayManager; public class MiningPlugin extends Plugin { private static final int ROCK_DISTANCE = 14; - private static final int MINING_GUILD_REGION = 12183; @Inject private Client client; @@ -123,11 +122,12 @@ public class MiningPlugin extends Plugin } final GameObject object = event.getGameObject(); + final int region = client.getLocalPlayer().getWorldLocation().getRegionID(); Rock rock = Rock.getRock(object.getId()); if (rock != null) { - RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(inMiningGuild()).toMillis(), rock.getZOffset()); + RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(region).toMillis(), rock.getZOffset()); respawns.add(rockRespawn); } } @@ -141,13 +141,14 @@ public class MiningPlugin extends Plugin } final WallObject object = event.getWallObject(); + final int region = client.getLocalPlayer().getWorldLocation().getRegionID(); switch (object.getId()) { case EMPTY_WALL: { Rock rock = Rock.AMETHYST; - RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(inMiningGuild()).toMillis(), rock.getZOffset()); + RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(region).toMillis(), rock.getZOffset()); respawns.add(rockRespawn); break; } @@ -157,7 +158,7 @@ public class MiningPlugin extends Plugin case DEPLETED_VEIN_26668: // Depleted motherlode vein { Rock rock = Rock.ORE_VEIN; - RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(inMiningGuild()).toMillis(), rock.getZOffset()); + RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(region).toMillis(), rock.getZOffset()); respawns.add(rockRespawn); break; } @@ -173,9 +174,4 @@ public class MiningPlugin extends Plugin } } } - - private boolean inMiningGuild() - { - return client.getLocalPlayer().getWorldLocation().getRegionID() == MINING_GUILD_REGION; - } } 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 8ecfeba2bd..582d7fd14a 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 @@ -38,17 +38,25 @@ enum Rock IRON(Duration.ofMillis(5400), 0, ROCKS_11364, ROCKS_11365, ROCKS_36203) { @Override - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { - return inMiningGuild ? Duration.ofMillis(2400) : super.respawnTime; + return region == MINING_GUILD ? Duration.ofMillis(2400) : super.respawnTime; } }, COAL(Duration.ofMillis(29400), 0, ROCKS_11366, ROCKS_11367, ROCKS_36204) { @Override - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { - return inMiningGuild ? Duration.ofMillis(14400) : super.respawnTime; + switch (region) + { + case MINING_GUILD: + return Duration.ofMillis(14400); + case MISCELLANIA: + return Duration.ofMillis(6600); + default: + return super.respawnTime; + } } }, SILVER(Duration.ofMinutes(1), 0, ROCKS_11368, ROCKS_11369, ROCKS_36205), @@ -58,25 +66,25 @@ enum Rock MITHRIL(Duration.ofMinutes(2), 0, ROCKS_11372, ROCKS_11373, ROCKS_36207) { @Override - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { - return inMiningGuild ? Duration.ofMinutes(1) : super.respawnTime; + return region == MINING_GUILD ? Duration.ofMinutes(1) : super.respawnTime; } }, ADAMANTITE(Duration.ofMinutes(4), 0, ROCKS_11374, ROCKS_11375, ROCKS_36208) { @Override - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { - return inMiningGuild ? Duration.ofMinutes(2) : super.respawnTime; + return region == MINING_GUILD || region == WILDERNESS_RESOURCE_AREA ? Duration.ofMinutes(2) : super.respawnTime; } }, RUNITE(Duration.ofMinutes(12), 0, ROCKS_11376, ROCKS_11377, ROCKS_36209) { @Override - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { - return inMiningGuild ? Duration.ofMinutes(6) : super.respawnTime; + return region == MINING_GUILD ? Duration.ofMinutes(6) : super.respawnTime; } }, ORE_VEIN(Duration.ofSeconds(MiningOverlay.ORE_VEIN_MAX_RESPAWN_TIME), 150), @@ -84,6 +92,9 @@ enum Rock ASH_VEIN(Duration.ofSeconds(30), 0, ASH_PILE), GEM_ROCK(Duration.ofMinutes(1), 0, ROCKS_11380, ROCKS_11381); + private static final int WILDERNESS_RESOURCE_AREA = 12605; + private static final int MISCELLANIA = 10044; + private static final int MINING_GUILD = 12183; private static final Map ROCKS; static @@ -111,7 +122,7 @@ enum Rock this.ids = ids; } - Duration getRespawnTime(boolean inMiningGuild) + Duration getRespawnTime(int region) { return respawnTime; }