CanItemBeSmithingExtractedOrRefined

From ESOUI Wiki

Jump to: navigation, search

This function tests whether the item in the specified bag slot can be deconstructed or refined at a blacksmithing, clothier, jewelry, or woodworking station.

This function doesn't check whether the target item is locked, even though it isn't supposed to be possible to deconstruct a locked item.

Arguments

bagId
A number representing the bag to check; it must be one of the built-in Bag values.
slotIndex
The numeric index of the slot in that bag which should be checked. For most bags, this is a number ranging from 1 to the size of the bag.
craftingType
A TradeskillType constant indicating the crafting station we want to test for. If a valid crafting type isn't specified, this acts as CRAFTING_TYPE_INVALID and will cause the function to always return false.

Example

if  CanItemBeSmithingExtractedOrRefined(bag, slot, GetCraftingInteractionType())
and not IsItemPlayerLocked(bag, slot)
then
   d("You can deconstruct/refine this item!")
end

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox