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
- bagName - the name of the specified bag (example "Green Woolen Bag")
local bagName = GetBagName(0); -- Returns localized "Backpack".
- bagName will contain the name of the specified bag if the bag number is 0-4 otherwise it will be nil, unless when the bank is opened, in which case GetBagName(-1) (for the bank) is nil and GetBagName(5) will give the name of the first bank bag, GetBagName(6) the name of the second bank bag, etc ... When coding, use the global variables (NUM_BAG_SLOTS, etc, ...) instead of hard coding these numbers, in case they change in the future. For details, see BagId.
- 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
- GetContainerNumSlots(-2) - always returns 32