WoW:API GetItemFamily: Difference between revisions
Jump to navigation
Jump to search
(Page created) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{Stub/API}}{{wowapi}} __NOTOC__ | |||
<!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> | <!-- Describe the purpose of the function, exhausting detail can be saved for a later section --> | ||
| Line 5: | Line 5: | ||
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | ||
bagType = GetItemFamily(itemID | "name" | "itemLink") | [[bagType]] = GetItemFamily(itemID | "name" | "itemLink") | ||
| Line 20: | Line 20: | ||
<!-- List each return value, together with its type --> | <!-- List each return value, together with its type --> | ||
:;bagType : bitfield - what type of bags an item can go into or if the item is a container what it can contain | :;[[bagType]] : bitfield - what type of bags an item can go into or if the item is a container what it can contain | ||
Revision as of 20:35, 4 March 2008
← WoW API < GetItemFamily
Gets the bitfield of what types of bags an item can go into or contain.
bagType = GetItemFamily(itemID | "name" | "itemLink")
Arguments
- (itemID | "name" | "itemLink")
- itemID
- Number - id of an item
- name
- String - name of an item
- itemLink
- String - link to an item
Returns
- bagType
- bitfield - what type of bags an item can go into or if the item is a container what it can contain
Example
local a = GetItemFamily(22786)
Result
a = 32
Details
- 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.
