custom type re
InventoryChange
re.InventoryChange
- 10 properties
One change to a server-side inventory in InventoryChanged
Properties
| Property | Type | Description |
|---|---|---|
client | re.ClientId | The client whose action made the change. API changes to an inventory that isn't a player's have match ClientId::Server(), while API changes to a player inventory are carried out by that player's client and have its id |
kind | re.InventoryChangeKind | |
inventory | re.InventoryId | The inventory that changed. For Transfer this is the destination, for Removed the inventory that lost the item |
source | re.InventoryId | The inventory a Transfer took the item from, otherwise 0 |
item | re.ItemInfo | The item as the inventory stores it now, or stored it before a Removed. Its quantity is how many came in or went out, and 0 for Updated and Generated |
total | uint | How many of the item the inventory contains now, the stack size for a stackable item and 1 or 0 for a unique item |
source_item | re.ItemRef | For Transfer, the item as the source inventory stores it. It can differ from item when a unique item got a new counter because its identity was already taken |
source_total | uint | For Transfer, how many of source_item the source inventory contains now |
data | byte[] | The stack the inventory contains now in Inventory.GetItemData form, ready for Inventory.AddItemData. Empty when total is 0 |
source_data | byte[] | For Transfer, the source's stack in Inventory.GetItemData form. Empty when source_total is 0 and for other kinds |