From 26fb55dffa9fa7c8da78440b4786577922414ae1 Mon Sep 17 00:00:00 2001 From: Lucwousin Date: Tue, 21 May 2019 16:38:03 +0200 Subject: [PATCH] Use normalized item ID for osb lookups in examine plugin (#344) --- .../client/plugins/examine/ExaminePlugin.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java index 936d814725..66878516d4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java @@ -349,7 +349,7 @@ public class ExaminePlugin extends Plugin OSBGrandExchangeResult osbresult = new OSBGrandExchangeResult(); try { - osbresult = CLIENT.lookupItem(itemComposition.getId()); + osbresult = CLIENT.lookupItem(id); } catch (IOException e) { @@ -359,11 +359,16 @@ public class ExaminePlugin extends Plugin .append(ChatColorType.NORMAL) .append(" GE ") .append(ChatColorType.HIGHLIGHT) - .append(StackFormatter.formatNumber(gePrice * quantity)) - .append(ChatColorType.NORMAL) - .append(" OSB ") - .append(ChatColorType.HIGHLIGHT) - .append(StackFormatter.formatNumber(osbresult.getOverall_average() * quantity)); + .append(StackFormatter.formatNumber(gePrice * quantity)); + + if (osbresult != null) + { + message + .append(ChatColorType.NORMAL) + .append(" OSB ") + .append(ChatColorType.HIGHLIGHT) + .append(StackFormatter.formatNumber(osbresult.getOverall_average() * quantity)); + } if (quantity > 1) {