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
This commit is contained in:
Eadgars-Ruse
2018-05-24 12:03:00 -05:00
committed by Tomas Slusny
parent b8283815fa
commit 772000ef04
2 changed files with 8 additions and 21 deletions

View File

@@ -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);
}
}
}

View File

@@ -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."),