WoW:API GetBagName: Difference between revisions
Jump to navigation
Jump to search
m
Corrected internal link.
mNo edit summary |
m (Corrected internal link.) |
||
Line 2: | Line 2: | ||
;''Arguments'' | ;''Arguments'' | ||
:;:(bagID) | :;:(bagID) | ||
:::;[[API TYPE bagID|bagID]] : number - number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left. | :::;[[API TYPE bagID|bagID]] : number - number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left. Actually, for this method, this parameter is valid as [[API_ContainerIDToInventoryID]]. | ||
---- | ---- | ||
Line 13: | Line 13: | ||
local bagName = GetBagName(0); | local bagName = GetBagName(0); | ||
--Returns "Backpack" | -- Returns localized "Backpack". | ||
---- | ---- | ||
Line 23: | Line 23: | ||
;''Notes'' | ;''Notes'' | ||
: It seems that there is no way to check the keyholder | : It seems that there is no way to check the keyholder name; GetContainerNumSlots and GetBagName returns 32 and nil while bagID is -2. | ||
:: GetBagName(-2) - returns nil | :: GetBagName(-2) - returns nil | ||
:: GetContainerNumSlots(-2) - returns | :: GetContainerNumSlots(-2) - always returns 32 |