IPGetIsItemEquipable

From NWN Lexicon
Jump to navigationJump to search



IPGetIsItemEquipable(object)

Checks if an item can be equipped.

int IPGetIsItemEquipable(
    object oItem
);

Parameters

oItem

Item to check whether or not can be equipped.


Description

Returns TRUE if item can be equipped.

Uses Get2DAString, so do not use in a loop!



Remarks

Simply queries the EquipableSlots column in "baseitems" with the basetype of oItem. Get2DAString can cause major lag when used in loops of even a fairly small size, so be careful if you want to use this in a loop.


Known Bugs

You should first check if the object is a valid item, because the function will return TRUE on an error, not FALSE.


Requirements

#include " x2_inc_itemprop "

Version

1.61

See Also

functions: 

ActionEquipItem



 author: Lilac Soul