InventoryTransaction
InventoryTransaction contains a list of actions that will be performed when the transaction is passed to Inventory.CommitTransaction. Because each function returns the InventoryTransaction, they can be chained to quickly add all the actions to the object.
Methods
Adds the given quantity of the given item to the holder's inventory.
Parameters
holderId
itemId
quantity
Returns
This is the equivalent of calling Give(player.user.id, itemId, quantity).
Parameters
Returns
Removes the given quantity of the given item from the from holder's inventory and adds the same quantity of that item to the to holder's inventory.
Parameters
fromHolderId
toHolderId
itemId
quantity
Returns
This is the equivalent of calling Move(fromPlayer.user.id, toPlayer.user.id, itemId, quantity).
Returns
Removes the given quantity of the given item from the player's reserved items.
Parameters
holderId
itemId
reservedFor
quantity
Returns
This is the equivalent of calling Release(player.user.id, itemId, reservedFor, quantity).
Parameters
Returns
Adds the given quantity of the given item to the holder's reserved items. Items that are reserved cannot be added or removed with Give, Take or Move. Use Release to remove the items from the reserved items.
Parameters
holderId
itemId
reservedFor
quantity
Returns
This is the equivalent of calling Reserve(player.user.id, itemId, reservedFor, quantity).
Parameters
Returns
Removes the given quantity of the given item from the holder's inventory.
Parameters
holderId
itemId
quantity
Returns
This is the equivalent of calling Take(player.user.id, itemId, quantity).
Parameters
Returns
Updated 12 days ago