Java Code Examples for net.runelite.api.ItemID#GIANT_POUCH_5515

The following examples show how to use net.runelite.api.ItemID#GIANT_POUCH_5515 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PouchOverlay.java    From plugins with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void renderItemOverlay(Graphics2D graphics, int itemId, WidgetItem itemWidget)
{
	switch (itemId)
	{
		case ItemID.MEDIUM_POUCH_5511:
		case ItemID.LARGE_POUCH_5513:
		case ItemID.GIANT_POUCH_5515:
			final Rectangle bounds = itemWidget.getCanvasBounds();
			final BufferedImage outline = itemManager.getItemOutline(itemId, itemWidget.getQuantity(), Color.RED);
			graphics.drawImage(outline, (int) bounds.getX(), (int) bounds.getY(), null);
			break;
		case ItemID.MEDIUM_POUCH:
			OverlayUtil.renderTextLocation(graphics, itemWidget.getCanvasLocation(), "~" + plugin.getMediumCharges(), Color.WHITE);
			break;
		case ItemID.LARGE_POUCH:
			OverlayUtil.renderTextLocation(graphics, itemWidget.getCanvasLocation(), "~" + plugin.getLargeCharges(), Color.WHITE);
			break;
		case ItemID.GIANT_POUCH:
			OverlayUtil.renderTextLocation(graphics, itemWidget.getCanvasLocation(), "~" + plugin.getGiantCharges(), Color.WHITE);
			break;
	}
}
 
Example 2
Source File: RunecraftPlugin.java    From plugins with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
private void onItemContainerChanged(ItemContainerChanged event)
{
	final ItemContainer container = event.getItemContainer();

	if (container == client.getItemContainer(InventoryID.INVENTORY))
	{
		degradedPouchInInventory = false;

		for (Item item : container.getItems())
		{
			if (!medDegrade && item.getId() == ItemID.MEDIUM_POUCH_5511)
			{
				medDegrade = true;
				mediumCharges = 0;
				degradedPouchInInventory = true;
			}
			else if (!largeDegrade && item.getId() == ItemID.LARGE_POUCH_5513)
			{
				largeDegrade = true;
				largeCharges = 0;
				degradedPouchInInventory = true;
			}
			else if (!giantDegrade && item.getId() == ItemID.GIANT_POUCH_5515)
			{
				giantDegrade = true;
				giantCharges = 0;
				degradedPouchInInventory = true;
			}
			else if (medDegrade && item.getId() == ItemID.MEDIUM_POUCH)
			{
				medDegrade = false;
				mediumCharges = MEDIUM_DEGRADE;
			}
			else if (largeDegrade && item.getId() == ItemID.LARGE_POUCH)
			{
				largeDegrade = false;
				largeCharges = LARGE_DEGRADE;
			}
			else if (giantDegrade && item.getId() == ItemID.GIANT_POUCH)
			{
				giantDegrade = false;
				giantCharges = GIANT_DEGRADE;
			}
		}
	}
}