From 28d9e75c9325550001d4288ea5907f8a925babdc Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Jan 2020 20:44:12 +0100 Subject: [PATCH] Fix talisman tooltip. --- .../dev/tricht/lunaris/listeners/ItemPriceListener.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/tricht/lunaris/listeners/ItemPriceListener.java b/src/main/java/dev/tricht/lunaris/listeners/ItemPriceListener.java index 92bb96c..4abebe8 100644 --- a/src/main/java/dev/tricht/lunaris/listeners/ItemPriceListener.java +++ b/src/main/java/dev/tricht/lunaris/listeners/ItemPriceListener.java @@ -103,7 +103,7 @@ public boolean supports(GameEvent event) { } private void displayItemTooltip(Item item) { - if (item == null || !item.hasPrice()) { + if (item == null || !item.exists()) { return; } @@ -130,6 +130,10 @@ private Map createBaseItemTooltip(Item item) { } private void addPoeNinjaPrice(Item item, Map elements) { + if (item.getMeanPrice() == null) { + elements.put(new Label("No poe.ninja price available"), new int[]{1, elements.size() - 1}); + return; + } elements.put(new Price(item), new int[]{1, elements.size() - 1}); if (item.getMeanPrice().getReason() != null) { elements.put(new Label("Reason: " + item.getMeanPrice().getReason()), new int[]{1, elements.size() - 1});