poh plugin: change gameobject map to tile object

This commit is contained in:
Seth
2018-03-16 16:38:33 -05:00
parent 7033879d2e
commit f6fbc1953b
2 changed files with 6 additions and 5 deletions

View File

@@ -29,9 +29,9 @@ import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.GameObject;
import net.runelite.api.Perspective;
import net.runelite.api.Point;
import net.runelite.api.TileObject;
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_LIT;
import static net.runelite.client.plugins.poh.PohPlugin.BURNER_UNLIT;
import net.runelite.client.ui.overlay.Overlay;
@@ -82,9 +82,9 @@ public class BurnerOverlay extends Overlay
return null;
}
private void drawBurner(Graphics2D graphics, String text, GameObject gameObject, Color color, java.awt.Point parent)
private void drawBurner(Graphics2D graphics, String text, TileObject tileObject, Color color, java.awt.Point parent)
{
Point canvasText = Perspective.getCanvasTextLocation(client, graphics, gameObject.getLocalLocation(), text, 200);
Point canvasText = Perspective.getCanvasTextLocation(client, graphics, tileObject.getLocalLocation(), text, 200);
if (canvasText == null)
{
@@ -97,6 +97,6 @@ public class BurnerOverlay extends Overlay
textComponent.render(graphics, parent);
//render tile
OverlayUtil.renderPolygon(graphics, gameObject.getCanvasTilePoly(), color);
OverlayUtil.renderPolygon(graphics, tileObject.getCanvasTilePoly(), color);
}
}

View File

@@ -44,6 +44,7 @@ import static net.runelite.api.ObjectID.INCENSE_BURNER_13211;
import static net.runelite.api.ObjectID.INCENSE_BURNER_13212;
import static net.runelite.api.ObjectID.INCENSE_BURNER_13213;
import net.runelite.api.Tile;
import net.runelite.api.TileObject;
import net.runelite.api.events.ConfigChanged;
import net.runelite.api.events.GameObjectDespawned;
import net.runelite.api.events.GameObjectSpawned;
@@ -62,7 +63,7 @@ public class PohPlugin extends Plugin
static final Set<Integer> BURNER_LIT = Sets.newHashSet(INCENSE_BURNER_13209, INCENSE_BURNER_13211, INCENSE_BURNER_13213);
@Getter(AccessLevel.PACKAGE)
private final Map<GameObject, Tile> pohObjects = new HashMap<>();
private final Map<TileObject, Tile> pohObjects = new HashMap<>();
@Inject
private PohOverlay overlay;