|
| ItemInventory (Item owner, ItemContainer container, int capacity, int slotsPerRow=5) |
|
override int | FindAllowedSlot (Item item, bool ignoreCondition=false) |
|
override bool | CanBePutInSlot (Item item, int i, bool ignoreCondition=false) |
| Can the item be put in the specified slot. More...
|
|
override bool | CanBePutInSlot (ItemPrefab itemPrefab, int i, float? condition, int? quality=null) |
|
override int | HowManyCanBePut (ItemPrefab itemPrefab, int i, float? condition, bool ignoreItemsInSlot=false) |
|
override bool | IsFull (bool takeStacksIntoAccount=false) |
| Is there room to put more items in the inventory. Doesn't take stacking into account by default. More...
|
|
override bool | TryPutItem (Item item, Character user, IEnumerable< InvSlotType > allowedSlots=null, bool createNetworkEvent=true, bool ignoreCondition=false) |
| If there is room, puts the item in the inventory and returns true, otherwise returns false More...
|
|
override bool | TryPutItem (Item item, int i, bool allowSwapping, bool allowCombine, Character user, bool createNetworkEvent=true, bool ignoreCondition=false) |
|
override void | RemoveItem (Item item) |
|
void | ServerEventWrite (IWriteMessage msg, Client c, Item.InventoryStateEventData inventoryData) |
|
| Inventory (Entity owner, int capacity, int slotsPerRow=5) |
|
bool | Contains (Item item) |
| Is the item contained in this inventory. Does not recursively check items inside items. More...
|
|
Item | FirstOrDefault () |
| Return the first item in the inventory, or null if the inventory is empty. More...
|
|
Item | LastOrDefault () |
| Return the last item in the inventory, or null if the inventory is empty. More...
|
|
Item | GetItemAt (int index) |
| Get the item stored in the specified inventory slot. If the slot contains a stack of items, returns the first item in the stack. More...
|
|
IEnumerable< Item > | GetItemsAt (int index) |
| Get all the item stored in the specified inventory slot. Can return more than one item if the slot contains a stack of items. More...
|
|
int | GetItemStackSlotIndex (Item item, int index) |
|
int | FindIndex (Item item) |
| Find the index of the first slot the item is contained in. More...
|
|
List< int > | FindIndices (Item item) |
| Find the indices of all the slots the item is contained in (two-hand items for example can be in multiple slots). Note that this method instantiates a new list. More...
|
|
virtual bool | ItemOwnsSelf (Item item) |
| Returns true if the item owns any of the parent inventories. More...
|
|
bool | CanBePut (Item item) |
| Can the item be put in the inventory (i.e. is there a suitable free slot or a stack the item can be put in). More...
|
|
bool | CanBePut (ItemPrefab itemPrefab, float? condition=null, int? quality=null) |
|
int | HowManyCanBePut (ItemPrefab itemPrefab, float? condition=null) |
|
bool | IsEmpty () |
|
void | CreateNetworkEvent () |
|
Item | FindItem (Func< Item, bool > predicate, bool recursive) |
|
List< Item > | FindAllItems (Func< Item, bool > predicate=null, bool recursive=false, List< Item > list=null) |
|
Item | FindItemByTag (Identifier tag, bool recursive=false) |
|
Item | FindItemByIdentifier (Identifier identifier, bool recursive=false) |
|
void | ForceToSlot (Item item, int index) |
| Forces an item to a specific slot. Doesn't remove the item from existing slots/inventories or do any other sanity checks, use with caution! More...
|
|
void | ForceRemoveFromSlot (Item item, int index) |
| Removes an item from a specific slot. Doesn't do any sanity checks, use with caution! More...
|
|
bool | IsInSlot (Item item, int index) |
|
void | SharedRead (IReadMessage msg, List< ushort >[] receivedItemIds, out bool readyToApply) |
|
void | SharedWrite (IWriteMessage msg, Range slotRange) |
|
void | DeleteAllItems () |
| Deletes all items inside the inventory (and also recursively all items inside the items) More...
|
|
void | ServerEventRead (IReadMessage msg, Client c) |
|