Add ItemLayer height to GroundItems overlay

Add back ItemLayer#getHeight consideration when drawing ground items.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-05-09 22:36:53 +02:00
parent 4b05e072c7
commit a94a6fab2a
3 changed files with 4 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ class GroundItem
private String name;
private int quantity;
private WorldPoint location;
private int height;
private int haPrice;
private int gePrice;

View File

@@ -181,7 +181,8 @@ public class GroundItemsOverlay extends Overlay
final Point textPoint = Perspective.getCanvasTextLocation(client,
graphics,
groundPoint,
itemString, OFFSET_Z);
itemString,
item.getHeight() + OFFSET_Z);
if (textPoint == null)
{

View File

@@ -265,6 +265,7 @@ public class GroundItemsPlugin extends Plugin
if (groundItem != null)
{
groundItem.setHeight(itemLayer.getHeight());
groundItems.add(groundItem);
}
}