From 772000ef0453fcd7b6310b7902f66971d5799e1b Mon Sep 17 00:00:00 2001 From: Eadgars-Ruse <38920911+Eadgars-Ruse@users.noreply.github.com> Date: Thu, 24 May 2018 12:03:00 -0500 Subject: [PATCH] Change hot/cold overlay to only show outline of dig area (#3166) - Change area overlay to single square dig overlay. This change improves FPS at destination and allows us to collect more accurate true center data. - Fix fremennik province lunar north area --- .../cluescrolls/clues/HotColdClue.java | 27 +++++-------------- .../clues/hotcold/HotColdLocation.java | 2 +- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java index b161ed3892..b340e9947d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/HotColdClue.java @@ -29,7 +29,6 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Point; -import java.awt.Polygon; import java.awt.Rectangle; import java.awt.geom.Rectangle2D; import java.util.ArrayList; @@ -42,7 +41,6 @@ import java.util.regex.Pattern; import lombok.Getter; import lombok.RequiredArgsConstructor; import net.runelite.api.NPC; -import net.runelite.api.Perspective; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; import static net.runelite.client.plugins.cluescrolls.ClueScrollOverlay.TITLED_CONTENT_COLOR; @@ -217,32 +215,21 @@ public class HotColdClue extends ClueScroll implements LocationClueScroll, Locat } } - // once the number of possible dig locations is below 10, highlight their ground areas + // once the number of possible dig locations is below 10, show the dig spots if (digLocations.size() < 10) { // Mark potential dig locations for (HotColdLocation hotColdLocation : digLocations) { - Rectangle2D r = hotColdLocation.getRect(); + WorldPoint wp = hotColdLocation.getWorldPoint(); + LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), wp.getX(), wp.getY()); - for (int i = (int) r.getMinX(); i <= r.getMaxX(); i++) + if (localLocation == null) { - for (int j = (int) r.getMinY(); j <= r.getMaxY(); j++) - { - LocalPoint localLocation = LocalPoint.fromWorld(plugin.getClient(), new WorldPoint(i, j, 0)); - - if (localLocation != null) - { - Polygon poly = Perspective.getCanvasTilePoly(plugin.getClient(), localLocation); - graphics.setColor(new Color(Color.BLUE.getRed(), Color.BLUE.getGreen(), Color.BLUE.getBlue(), 50)); - - if (poly != null) - { - graphics.fillPolygon(poly); - } - } - } + return; } + + OverlayUtil.renderTileOverlay(plugin.getClient(), graphics, localLocation, SPADE_IMAGE, Color.ORANGE); } } } 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 c496a7ba8e..db5e5e1347 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 @@ -90,7 +90,7 @@ public enum HotColdLocation FREMENNIK_PROVINCE_PIRATES_COVE(new WorldPoint(2210, 3814, 0), FREMENNIK_PROVINCE, "Pirates' Cove"), FREMENNIK_PROVINCE_ASTRAL_ALTER(new WorldPoint(2147, 3862, 0), FREMENNIK_PROVINCE, "Astral altar"), FREMENNIK_PROVINCE_LUNAR_VILLAGE(new WorldPoint(2087, 3915, 0), FREMENNIK_PROVINCE, "Lunar Isle, inside the village."), - FREMENNIK_PROVINCE_LUNAR_NORTH(new WorldPoint(2101, 3949, 0), FREMENNIK_PROVINCE, "Lunar Isle, north of the village."), + FREMENNIK_PROVINCE_LUNAR_NORTH(new WorldPoint(2106, 3949, 0), FREMENNIK_PROVINCE, "Lunar Isle, north of the village."), KANDARIN_SINCLAR_MANSION(new WorldPoint(2726, 3588, 0), KANDARIN, "North-west of the Sinclair Mansion, near the log balance shortcut."), KANDARIN_CATHERBY(new WorldPoint(2774, 3433, 0), KANDARIN, "Catherby, between the bank and the beehives, near small rock formation."), KANDARIN_GRAND_TREE(new WorldPoint(2449, 3509, 0), KANDARIN, "Grand Tree, just east of the terrorchick gnome enclosure."),