Fandom

WoWWiki

API GetItemFamily

104,634pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetItemFamily

Gets the bitfield of what types of bags an item can go into or contain.

bagType = GetItemFamily(itemId or "itemName" or "itemLink")

Arguments Edit

(itemId or "itemName" or "itemLink")
itemId 
Integer - The numeric ID of the item. ie. 12345
itemName 
String - The Name of the Item, ex: "Hearthstone"
itemLink 
String - The itemLink, when Shift-Clicking items.

Returns Edit

bagType 
Bitfield - What type of bags an item can go into or if the item is a container what it can contain

Example Edit

local a = GetItemFamily(22786)

Result

a = 32

Details Edit

New function for 2.4 that allows you to find out what items can go into what bags. If the item you pass is a container itself it will return what items it can contain since containers can always only go in general purpose bags. This function only returns info for the items in the item cache just like GetItemInfo. If the item is not in the item cache the function will return nil.
The best way of testing if an item is a bag (or quiver) is to GetItemInfo() it and check if the 9th return value is "INVTYPE_BAG". All other tests require localization.

Also on Fandom

Random Wiki