examine plugin: add looting bag item examine support

This commit is contained in:
Dylan Critz
2018-11-05 08:14:41 -06:00
committed by Adam
parent 826fa05751
commit cd15227585
3 changed files with 20 additions and 2 deletions

View File

@@ -120,6 +120,7 @@ public class WidgetID
public static final int SPELLBOOK_GROUP_ID = 218;
public static final int PVP_GROUP_ID = 90;
public static final int ZEAH_MESS_HALL_GROUP_ID = 235;
public static final int LOOTING_BAG_GROUP_ID = 81;
static class WorldMap
{
@@ -717,4 +718,9 @@ public class WidgetID
{
static final int MESS_HALL_COOKING_DISPLAY = 3;
}
static class LootingBag
{
static final int LOOTING_BAG_INVENTORY = 5;
}
}

View File

@@ -450,7 +450,9 @@ public enum WidgetInfo
DEADMAN_PROTECTION_TEXT(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.WILDERNESS_LEVEL),
DEADMAN_PROTECTION_TIME(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.DEADMAN_PROTECTION_TIME),
ZEAH_MESS_HALL_COOKING_DISPLAY(WidgetID.ZEAH_MESS_HALL_GROUP_ID, WidgetID.Zeah.MESS_HALL_COOKING_DISPLAY);
ZEAH_MESS_HALL_COOKING_DISPLAY(WidgetID.ZEAH_MESS_HALL_GROUP_ID, WidgetID.Zeah.MESS_HALL_COOKING_DISPLAY),
LOOTING_BAG_CONTAINER(WidgetID.LOOTING_BAG_GROUP_ID, WidgetID.LootingBag.LOOTING_BAG_INVENTORY);
private final int groupId;
private final int childId;

View File

@@ -55,7 +55,7 @@ import net.runelite.client.util.StackFormatter;
import net.runelite.http.api.examine.ExamineClient;
/**
* Submits exammine info to the api
* Submits examine info to the api
*
* @author Adam
*/
@@ -268,6 +268,16 @@ public class ExaminePlugin extends Plugin
itemId = widgetItem.getItemId();
}
}
else if (WidgetInfo.LOOTING_BAG_CONTAINER.getGroupId() == widgetGroup)
{
Widget[] children = widget.getDynamicChildren();
if (pendingExamine.getActionParam() < children.length)
{
Widget widgetItem = children[pendingExamine.getActionParam()];
quantity = widgetItem.getItemQuantity();
itemId = widgetItem.getItemId();
}
}
}
if (itemId == -1)