Table of Contents

Interface IInventoryController

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

Interface for inventory controllers, managing activation and slot swapping logic for a character's inventory. Extends character behaviour and item container functionality.

public interface IInventoryController : ICharacterBehaviour, IItemContainer
Inherited Members

Methods

Activate(int)

Activates the item in the specified inventory slot, typically triggering its use effect.

void Activate(int index)

Parameters

index int

The inventory slot index to activate.

CanSwapItemSlots(int, int, InventoryType)

Determines if two item slots can be swapped, preventing invalid swaps (e.g., same slot).

bool CanSwapItemSlots(int from, int to, InventoryType fromInventory)

Parameters

from int

The source slot index.

to int

The destination slot index.

fromInventory InventoryType

The inventory type of the source slot.

Returns

bool

True if the slots can be swapped, false otherwise.