diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxOverlay.java index ea3a3fb0e8..00d60e94ee 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxOverlay.java @@ -105,6 +105,7 @@ public class CoxOverlay extends Overlay if (plugin.isTektonTickCounter()) { ticksLeft = npcs.getTicksUntilAttack(); + int attackTicksleft = plugin.getTektonAttackTicks(); if (ticksLeft > 0) { if (ticksLeft == 1) @@ -362,26 +363,26 @@ public class CoxOverlay extends Overlay graphics.fill(poly); } -// private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha) -// { -// int size = 1; -// NPCDefinition composition = actor.getTransformedDefinition(); -// if (composition != null) -// { -// size = composition.getSize(); -// } -// LocalPoint lp = actor.getLocalLocation(); -// Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size); -// -// if (tilePoly != null) -// { -// graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha)); -// graphics.setStroke(new BasicStroke(outlineWidth)); -// graphics.draw(tilePoly); -// graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha)); -// graphics.fill(tilePoly); -// } -// } + private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha) + { + int size = 1; + NPCDefinition composition = actor.getTransformedDefinition(); + if (composition != null) + { + size = composition.getSize(); + } + LocalPoint lp = actor.getLocalLocation(); + Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size); + + if (tilePoly != null) + { + graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha)); + graphics.setStroke(new BasicStroke(outlineWidth)); + graphics.draw(tilePoly); + graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha)); + graphics.fill(tilePoly); + } + } private void renderActorOverlay(Graphics2D graphics, Actor actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxPlugin.java index 66fbf64492..9dc12d080f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxPlugin.java @@ -83,7 +83,7 @@ import net.runelite.client.util.Text; public class CoxPlugin extends Plugin { private static final int ANIMATION_ID_G1 = 430; - // private static final String OLM_HAND_CRIPPLE = "The Great Olm\'s left claw clenches to protect itself temporarily."; + private static final String OLM_HAND_CRIPPLE = "The Great Olm\'s left claw clenches to protect itself temporarily."; private static final Pattern TP_REGEX = Pattern.compile("You have been paired with (.*)! The magical power will enact soon..."); @Setter @Getter(AccessLevel.PACKAGE) @@ -92,11 +92,11 @@ public class CoxPlugin extends Plugin protected long lastPrayTime; private int sleepcount = 0; private boolean needOlm = false; - // private GraphicsObject teleportObject; + private GraphicsObject teleportObject; @Inject private Client client; - // @Inject - // private ChatMessageManager chatMessageManager; + @Inject + private ChatMessageManager chatMessageManager; @Inject private CoxOverlay coxOverlay; @Inject