Item Transaction Collection

The Item Transaction Collection is a special Item Collection which does not hold more than one Item at a time. It is usually used as the Main Item Collection to move items to the Item Collection where they belong.

Item Collection Names : The names of the Item Collections that the Transaction Collection should check when an item is added.
Overflow Back To Origin : When an item overflow (aka is rejected) should it be returned where it came from? This only works if the origin of the Item is available from the Item Info.
Rejected Item Actions : The Item Actions on this Category Item Action will be invoked on the item that was rejected.
Return Real Added Item Amount : Return the item amount that was actually added in the right item collection or return also the amount that was rejected (in case it was added externally)?

The Item Transaction Collection works by checking the linked ItemCollection in order and checking if the item added fits in any of them. To know if an item fits in an Item Collection Item Restrictions are used. If the item does fit in an item collection it is added where it belongs. If not an event is triggered saying that the item was rejected.

 

API

//Listen to the On Rejected item event.
EventHandler.RegisterEvent<ItemInfo>(m_Inventory, EventNames.c_Inventory_OnRejected_ItemInfo, HandleItemInfoRejected);