Skip to content

CanEquipItem

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanEquipItem( PlayerInventory instance, Item item, int targetSlot )
{
    Puts( "CanEquipItem works!" );
}

Location

  • PlayerInventory::CanEquipItem(Item item, int targetSlot)
csharp
private bool CanEquipItem(Item item, int targetSlot)
{
	object returnvar = Interface.CallHook("CanEquipItem", this, item, targetSlot);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	if ((item.info.flags & ItemDefinition.Flag.NotAllowedInBelt) != (ItemDefinition.Flag)0)
//---

Released under the MIT License.