public class SwarmUserInventory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
consumeItem(int itemId)
Consuming a consumable SwarmStoreItem item will decrease the quantity of the item in the user's SwarmUserInventory by 1.
|
void |
consumeItem(SwarmStoreItem item)
Consuming a consumable SwarmStoreItem will decrease the quantity of the item in the user's inventory by 1.
|
boolean |
containsItem(int itemId)
Check the user's SwarmUserInventory to see if it contains a SwarmStoreItem that corresponds to the specified SwarmStoreItem itemId
|
boolean |
containsItem(SwarmStoreItem item)
Check the user's SwarmUserInventory to see if it contains the specified param SwarmStoreItem.
|
SwarmStoreItem |
getItem(int itemId)
Get the SwarmStoreItem in the user's inventory that has the same itemId as the specified param itemId
|
java.util.List<SwarmStoreItem> |
getItemList()
Get the list of SwarmStoreItems in the user's SwarmUserInventory.
|
int |
getItemQuantity(int itemId)
Get the quantity of the specified itemId that may (or may not) exist in the user's SwarmUserInventory.
|
int |
getItemQuantity(SwarmStoreItem item)
Get the quantity of the specified SwarmStoreItem that may (or may not) exist in the user's SwarmUserInventory.
|
void |
refresh(SwarmActiveUser.GotInventoryCB cb)
Refresh the SwarmStoreItems and corresponding quantities of those items in the user's SwarmUserInventory.
|
public void refresh(SwarmActiveUser.GotInventoryCB cb)
cb
- GetInventoryCB callback returns the user's SwamUserInventory on success. Returns null on failure.public java.util.List<SwarmStoreItem> getItemList()
public boolean containsItem(SwarmStoreItem item)
item
- The SwarmStoreItem that may (or may not) exist in the user's SwarmUserInventory.public boolean containsItem(int itemId)
itemId
- The itemId for the SwarmStoreItem that may (or may not) exist in the user's SwarmUserInventory.public SwarmStoreItem getItem(int itemId)
itemId
- The SwarmStoreItem itemId that may (or may not) exist in the user's SwarmUserInventory.public int getItemQuantity(SwarmStoreItem item)
item
- The SwarmStoreItem that may (or may not) exist the user's SwarmUserInventory.public int getItemQuantity(int itemId)
itemId
- The itemId number of the SwarmStoreItem that may (or may not) exist the user's SwarmUserInventory.public void consumeItem(int itemId)
itemId
- The itemId of the consumable SwarmStoreItem to consume.public void consumeItem(SwarmStoreItem item)
item
- The consumable SwarmStoreItem item to consume.