Class ItemEventData
Event data for an item-related action or condition. Used to pass item, inventory, and container information to actions and conditions that operate on items.
public class ItemEventData : EventData
- Inheritance
-
ItemEventData
- Inherited Members
Constructors
ItemEventData(ICharacter, Item, int, IItemContainer, ItemSlot)
Initializes a new instance of the ItemEventData class.
public ItemEventData(ICharacter initiator, Item item, int inventoryIndex = -1, IItemContainer sourceContainer = null, ItemSlot targetSlot = ItemSlot.Head)
Parameters
initiatorICharacterThe character initiating the event.
itemItemThe item involved in the event.
inventoryIndexintThe index in the inventory where the item is located, or -1 if not applicable.
sourceContainerIItemContainerThe container from which the item originates.
targetSlotItemSlotThe equipment slot the item is being moved to or checked against.
Properties
InventoryIndex
The index in the inventory where the item is located, or -1 if not applicable.
public int InventoryIndex { get; }
Property Value
Item
The item involved in the event (e.g., to equip, unequip, or check).
public Item Item { get; }
Property Value
SourceContainer
The container from which the item originates (e.g., inventory, bank, etc.).
public IItemContainer SourceContainer { get; }
Property Value
TargetSlot
The equipment slot the item is being moved to or checked against.
public ItemSlot TargetSlot { get; }