Table of Contents

Class ItemEventData

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

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

initiator ICharacter

The character initiating the event.

item Item

The item involved in the event.

inventoryIndex int

The index in the inventory where the item is located, or -1 if not applicable.

sourceContainer IItemContainer

The container from which the item originates.

targetSlot ItemSlot

The 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

int

Item

The item involved in the event (e.g., to equip, unequip, or check).

public Item Item { get; }

Property Value

Item

SourceContainer

The container from which the item originates (e.g., inventory, bank, etc.).

public IItemContainer SourceContainer { get; }

Property Value

IItemContainer

TargetSlot

The equipment slot the item is being moved to or checked against.

public ItemSlot TargetSlot { get; }

Property Value

ItemSlot