Introduction
This class provides the ability to house items
Fields#
| Name | Description |
|---|---|
| On Weight Changed | Event raised when total weight changes |
| On Item Added | Event raised when an item is added to inventory |
| On Item Removed | Event raised when an item is removed from inventory |
| On Count Changed | Event raised when the number of stored items changes |
| On Initialize Plugin | Event raised when a plugin requires initialization |
Properties#
| Name | Description |
|---|---|
| host | Gets the inventory hosting this object |
| initialized | Gets if this object has been initialized |
| instanceId | Gets the id for this instance of the object |
| ignoreLimits | Gets if limits such as category and weight should be ignored |
| isItemContainer | Gets if this container is on an item |
| maximumItems | Gets the maximum number of items for this container |
| maximumWeight | Gets the maximum weight for this container |
| pluginWrappers | Gets a lit of plugin wrappers for this object |
| plugins | Gets a list of plugins for this object |
| statSource | Gets the stat source for this object |
| items | Gets a list of items in this container |
| totalItemWeight | Gets the total weight of items in this container |
Methods#
| Name | Description |
|---|---|
| AddItem | Add an item |
| AddItems | Add a list of items item to the container |
| DataLoad | Load data from a stream |
| DataLoadJSON | Load data from a JSON string |
| DataSave | Save data to a stream |
| DataSaveJSON | Save data to a JSON string |
| GetItems | Get a list of items meeting the condition, rarity and count |
| GetItemByInstanceId | Get a stored item by its instance id |
| GetItemCategory | Get an item category boy id |
| GetPlugin | Get plugin of type T |
| GetUsedItemCategorySlots | Get number of slots used in a category |
| Initialize | Initialize the object |
| InitializeItemContainer | Initialize the object for an item container |
| ItemTotalCount | Get the total count of an item across all stacks, conditions, etc |
| MergeStacks | Merge two stacks of the same item into one, stack limits still apply |
| RemoveAllItems | Remove all items |
| RemoveItem | Remove an item |
| RemoveItemByInstance | Remove an item |
| ReplaceItem | Replace an existing item with a new one |
| Shutdown | Shutdown the object |
| SplitStack | Split a stack into two |