Class ContainerSlot
java.lang.Object
privbot.hooks.container.ContainerSlot
One occupied slot in a widget-backed item container.
Deliberately not a Widget. On Impact a container's items live in one flat array hanging
off a single widget — there are no per-slot child widgets to hold — and a menu action against one
is addressed by (item id, slot index, container widget id). This type mirrors that
dispatch shape rather than the widget tree.
ShopSlot and BankSlot are the same shape and predate this class. They are left
alone rather than migrated: both back working dispatch paths, and the value of a shared type here
is in not adding a third copy, not in churning two that work.
-
Constructor Summary
ConstructorsConstructorDescriptionContainerSlot(int containerWidgetId, int slotIndex, int itemId, String itemName, int quantity) -
Method Summary
Modifier and TypeMethodDescriptionintOwning widget — theparam1of an action against this slot.intitemId()Item held here — theidentifier.itemName()Display name, or null when the definition could not be resolved.intquantity()Stack size in this slot.intPosition within the container — theparam0.toString()
-
Constructor Details
-
ContainerSlot
public ContainerSlot(int containerWidgetId, int slotIndex, int itemId, String itemName, int quantity)
-
-
Method Details
-
containerWidgetId
public int containerWidgetId()Owning widget — theparam1of an action against this slot. -
slotIndex
public int slotIndex()Position within the container — theparam0. -
itemId
public int itemId()Item held here — theidentifier. -
itemName
Display name, or null when the definition could not be resolved. -
quantity
public int quantity()Stack size in this slot. -
toString
-