lootpile: Add a couple ticks for the death animation and don't show

negative numbers
This commit is contained in:
Owain van Brakel
2019-07-11 07:50:43 +02:00
parent d26bf5a07a
commit be6646e519
2 changed files with 7 additions and 7 deletions

View File

@@ -79,20 +79,20 @@ public class LootAssistOverlay extends Overlay
Point timeLoc = Perspective.getCanvasTextLocation(client, graphics, lp, Point timeLoc = Perspective.getCanvasTextLocation(client, graphics, lp,
timeOverlay, graphics.getFontMetrics().getHeight()); timeOverlay, graphics.getFontMetrics().getHeight());
OverlayUtil.renderPolygon(graphics, poly, Color.WHITE); OverlayUtil.renderPolygon(graphics, poly, Color.WHITE);
if (timeRemaining < 5) if (timeRemaining < 5 && timeRemaining > 0)
{ {
OverlayUtil.renderTextLocation(graphics, timeLoc, timeOverlay, Color.RED); OverlayUtil.renderTextLocation(graphics, timeLoc, timeOverlay, Color.RED);
OverlayUtil.renderTextLocation(graphics, textLoc, nameOverlay, Color.RED); OverlayUtil.renderTextLocation(graphics, textLoc, nameOverlay, Color.RED);
} }
if (timeRemaining < 2) else if (timeRemaining <= 60)
{
client.setHintArrow(WorldPoint.fromLocal(client, lp));
}
else
{ {
OverlayUtil.renderTextLocation(graphics, timeLoc, timeOverlay, Color.WHITE); OverlayUtil.renderTextLocation(graphics, timeLoc, timeOverlay, Color.WHITE);
OverlayUtil.renderTextLocation(graphics, textLoc, nameOverlay, Color.WHITE); OverlayUtil.renderTextLocation(graphics, textLoc, nameOverlay, Color.WHITE);
} }
if (timeRemaining < 2)
{
client.setHintArrow(WorldPoint.fromLocal(client, lp));
}
} }

View File

@@ -7,7 +7,7 @@ import net.runelite.api.coords.WorldPoint;
class LootPile class LootPile
{ {
private static final long TIME_UNTIL_VISIBLE = 60000; private static final long TIME_UNTIL_VISIBLE = 62400;
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
private final long timeAppearing; private final long timeAppearing;