WoW:API GetItemFamily: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{wowapi}}__NOTOC__ | |||
Gets the bitfield of what types of bags an item can go into or contain. | Gets the bitfield of what types of bags an item can go into or contain. | ||
[[bagType]] = GetItemFamily(itemId or "itemName" or "itemLink") | |||
[[bagType]] = GetItemFamily( | |||
== Arguments == | == Arguments == | ||
:(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 == | == Returns == | ||
:;[[bagType]] : Bitfield - What type of bags an item can go into or if the item is a container what it can contain | |||
:;[[bagType]] : | |||
== Example == | == Example == | ||
local a = GetItemFamily(22786) | local a = GetItemFamily(22786) | ||
<big>'''Result'''</big> | <big>'''Result'''</big> | ||
a = 32 | a = 32 | ||
== Details == | == 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 [[API GetItemInfo|GetItemInfo]]. If the item is not in the item cache the function will return ''nil''. | |||
: 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. | |||
Revision as of 17:00, 3 June 2008
← 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
- (itemId or "itemName" or "itemLink")
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.