WoW:ItemFamily: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Create new page for bagType API type)
 
m (Move page script moved page ItemFamily to ItemFamily without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapitype}}{{Stub/API}}
{{DISPLAYTITLE:itemFamily}}{{wowapitype}}<br>{{Stub/API}}
bagType is a bitflag (a number usable with [[Lua_functions#Bit_Functions|bitlib]])
'''itemFamily''' is a ''bitfield'' (a number usable with [[Lua_functions#Bit_Functions|bitlib]])
 
: 0 = Unspecified (for [[bag]]s it means any item, for items it means no special bag type)
: 0 = Unspecified (for [[bag]]s it means any item, for items it means no special bag type)
: 1 = [[Quiver]]
: 1 = [[Quiver]]
Line 6: Line 7:
: 4 = [[Soul Bag]]
: 4 = [[Soul Bag]]
: 8 = [[Leatherworking Bag]]
: 8 = [[Leatherworking Bag]]
: 16 = Unknown
: 16 = [[Inscription Bag]]
: 32 = [[Herb Bag]]
: 32 = [[Herb Bag]]
: 64 = [[Enchanting Bag]]
: 64 = [[Enchanting Bag]]
Line 15: Line 16:
: 2048 = Unknown
: 2048 = Unknown
: 4096 = Vanity Pets
: 4096 = Vanity Pets
To date (patch 3.2), no bags are flagged as combination of these bits, but it ''is'' entirely possible that such bags will be added in the future.
Note that GetItemFamily() on e.g. an unequipped herbalism bag (placed inside your bags!) will still return e.g. "32". But that does NOT mean it can be placed inside an equipped herbalism bag!  The best way to test if an object is a bag is e.g. <code>select(9,GetItemInfo(itemLink))=="INVTYPE_BAG"</code>

Latest revision as of 04:48, 15 August 2023

Warning: Display title "WoW API type: ItemFamily" overrides earlier display title "itemFamily".API types

itemFamily is a bitfield (a number usable with bitlib)

0 = Unspecified (for bags it means any item, for items it means no special bag type)
1 = Quiver
2 = Ammo Pouch
4 = Soul Bag
8 = Leatherworking Bag
16 = Inscription Bag
32 = Herb Bag
64 = Enchanting Bag
128 = Engineering Bag
256 = Keyring
512 = Gem Bag
1024 = Mining Bag
2048 = Unknown
4096 = Vanity Pets

To date (patch 3.2), no bags are flagged as combination of these bits, but it is entirely possible that such bags will be added in the future.

Note that GetItemFamily() on e.g. an unequipped herbalism bag (placed inside your bags!) will still return e.g. "32". But that does NOT mean it can be placed inside an equipped herbalism bag! The best way to test if an object is a bag is e.g. select(9,GetItemInfo(itemLink))=="INVTYPE_BAG"