|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Holds items being carried by a Monster or Player.
Nested Class Summary |
Nested classes inherited from class wyvern.lib.Bag |
Bag.FullBagException, Bag.InvalidItemException |
Field Summary |
Fields inherited from interface wyvern.lib.Bag |
BAG_CUT_PERCENT_CAP, BAG_DEFAULT_CAPACITY |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Method Summary | |
void |
computeEncumbrance()
Computes the encumbrance level of the monster associated with this inventory. |
GameObject |
findByHashcode(int hashcode)
Returns an object in the inventory matching the passed hashcode. |
GameObject |
findByHashcode(java.lang.String hashcode)
Returns an object in the inventory matching the passed hashcode. |
GameObject |
getByIndex(java.lang.String num)
Returns an item specified as a string index "#number" |
Command |
getCommand(CommandEvent event,
Commandable agent)
Iterates over the objects in the inventory, looking for an object implementing the Command interface that claims to know the command. |
Commandable |
getOwner()
Returns the Commandable (usually a Monster or Player) who owns this inventory. |
GameObject[] |
objects()
Returns an array containing the objects of the inventory, in the order in which they occur in the inventory. |
void |
resend(int index)
Tells the inventory that an item's appearance has changed, so it needs to be re-sent to the client. |
void |
resendAll()
Resends the entire inventory display. |
void |
setOwner(Commandable owner)
Sets the owner for this inventory. |
Methods inherited from interface wyvern.lib.Bag |
add, adjust, canHoldMore, contains, filter, find, findByName, getCapacity, getItemWeight, getMaxCount, getPosition, getRemainingCapacity, hasRoomFor, hasRoomFor, indexOf, insert, invalidate, isEmpty, iterator, objectAt, printItemList, remove, remove, removeAll, removeAll, removeFirst, removeFirst, setCapacity, setCapacity, setObjectAt, size, visitObjects |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Methods inherited from interface wyvern.lib.Container |
isBag, isInventory, isMap |
Method Detail |
public void resend(int index)
index
- the index of the item to resend.public void resendAll()
public GameObject[] objects()
public Commandable getOwner()
public void setOwner(Commandable owner)
owner
- the new owner for the inventory.public Command getCommand(CommandEvent event, Commandable agent)
event
- the event to look for a handler foragent
- the agent doing the command
public GameObject findByHashcode(java.lang.String hashcode)
hashcode
- the hashcode for the object (as a string)
public GameObject findByHashcode(int hashcode)
hashcode
- the hashcode for the object
public GameObject getByIndex(java.lang.String num)
num
- the input string, e.g. "#3".
public void computeEncumbrance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |