Make examine work for smithing interface

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-09-28 23:55:15 +02:00
parent 4c01b0d260
commit 7bccf3b976
3 changed files with 19 additions and 0 deletions

View File

@@ -219,6 +219,15 @@ public class ExaminePlugin extends Plugin
itemId = widgetItem.getItemId();
}
}
else if (WidgetInfo.SMITHING_INVENTORY_ITEMS_CONTAINER.getGroupId() == widgetGroup)
{
Widget widgetItem = widget.getChild(2);
if (widgetItem != null)
{
quantity = widgetItem.getItemQuantity();
itemId = widgetItem.getItemId();
}
}
else if (WidgetInfo.BANK_INVENTORY_ITEMS_CONTAINER.getGroupId() == widgetGroup
|| WidgetInfo.RUNE_POUCH_ITEM_CONTAINER.getGroupId() == widgetGroup)
{
@@ -268,6 +277,8 @@ public class ExaminePlugin extends Plugin
private void getItemPrice(int id, ItemComposition itemComposition, int quantity)
{
// quantity is at least 1
quantity = Math.max(1, quantity);
int itemCompositionPrice = itemComposition.getPrice();
final int gePrice = itemManager.getItemPrice(id);
final int alchPrice = itemCompositionPrice <= 0 ? 0 : Math.round(itemCompositionPrice * HIGH_ALCHEMY_CONSTANT);