public class GrandExchangeSlot
extends java.lang.Object
Constructor and Description |
---|
GrandExchangeSlot(int index,
GrandExchangeOffer offer,
APIContext ctx) |
Modifier and Type | Method and Description |
---|---|
boolean |
abortOffer()
Aborts the offer from the
IGrandExchangeAPI.GrandExchangeScreen.OVERVIEW screen. |
boolean |
canCollect()
Whether or not the slot has any number of items/coins to collect.
|
int |
getIndex()
Gets the slot index.
|
GrandExchangeOffer |
getOffer()
Gets the offer.
|
GrandExchangeOffer.OfferState |
getState()
Gets the offer state.
|
WidgetChild |
getWidget()
Get the slot widget when visible.
|
boolean |
inUse()
Whether or not the slot is in use, basically not
GrandExchangeOffer.OfferState.EMPTY . |
boolean |
isCompleted()
Gets whether or not the offer is completed aka checks if the slot state is
GrandExchangeOffer.OfferState.BOUGHT or GrandExchangeOffer.OfferState.SOLD . |
boolean |
placeBuyOffer(java.lang.String itemName,
int quantity,
int price)
Places a new buy offer using this (empty) slot.
|
boolean |
placeSellOffer(int itemId,
int quantity,
int price)
Places a new sell offer using this (empty) slot.
|
boolean |
placeSellOffer(ItemWidget item,
int quantity,
int price)
Places a new sell offer using this (empty) slot.
|
boolean |
placeSellOffer(java.lang.String itemName,
int quantity,
int price)
Places a new sell offer using this (empty) slot.
|
java.lang.String |
toString() |
boolean |
viewOffer()
Views the offer from the
IGrandExchangeAPI.GrandExchangeScreen.OVERVIEW screen. |
public GrandExchangeSlot(int index, GrandExchangeOffer offer, APIContext ctx)
public int getIndex()
public GrandExchangeOffer.OfferState getState()
GrandExchangeOffer.OfferState
public boolean inUse()
GrandExchangeOffer.OfferState.EMPTY
.public boolean isCompleted()
GrandExchangeOffer.OfferState.BOUGHT
or GrandExchangeOffer.OfferState.SOLD
.public boolean canCollect()
public GrandExchangeOffer getOffer()
public boolean viewOffer()
IGrandExchangeAPI.GrandExchangeScreen.OVERVIEW
screen.public boolean abortOffer()
IGrandExchangeAPI.GrandExchangeScreen.OVERVIEW
screen.public boolean placeBuyOffer(java.lang.String itemName, int quantity, int price)
itemName
- the exact item name (KeyEvent.VK_ENTER
is pressed after search)quantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide pricepublic boolean placeSellOffer(int itemId, int quantity, int price)
itemId
- the item idquantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide pricepublic boolean placeSellOffer(java.lang.String itemName, int quantity, int price)
itemName
- the item namequantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide pricepublic boolean placeSellOffer(ItemWidget item, int quantity, int price)
item
- the itemquantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide pricepublic WidgetChild getWidget()
WidgetID.BANK_GROUP_ID
) is not visible.public java.lang.String toString()
toString
in class java.lang.Object