Class ShopSlot
java.lang.Object
privbot.hooks.shop.ShopSlot
One occupied slot in a shop's stock container.
Deliberately not a Widget. On Impact a shop's stock is a single container hanging off one
widget — there are no per-slot child widgets to hold — and a player's buy click names the item id, the
slot index and the container's widget id. This type carries exactly those three, so a buy is sent the way
the player's own click is.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOwning widget — theparam1of a buy.intitemId()Item held here — theidentifierof a buy.itemName()Display name, or null when the definition could not be resolved.intPosition within the container — theparam0of a buy.intstock()Units the shop still has, as reported by the container's quantity array.toString()
-
Constructor Details
-
ShopSlot
-
-
Method Details
-
containerWidgetId
public int containerWidgetId()Owning widget — theparam1of a buy. -
slotIndex
public int slotIndex()Position within the container — theparam0of a buy. -
itemId
public int itemId()Item held here — theidentifierof a buy. -
itemName
Display name, or null when the definition could not be resolved. -
stock
public int stock()Units the shop still has, as reported by the container's quantity array. -
toString
-