Table of Contents

Method CheckFit

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

CheckFit(NwItem)

Returns whether the specified item can fit within this inventory's grid.

public bool CheckFit(NwItem item)

Parameters

item NwItem

The item to check.

Returns

bool

True if the item fits within the available dimensions; otherwise, false.

CheckFit(NwBaseItem)

Returns whether the specified base item type can fit within this inventory's grid.

public bool CheckFit(NwBaseItem baseItem)

Parameters

baseItem NwBaseItem

The base item type to check.

Returns

bool

True if a placement exists that accommodates the item's slot size; otherwise, false.

Remarks

This check tests all possible top-left positions against the repository width and height and the base item slot size. It does not consider weight, stack counts, or scripted placement constraints.