Returns the inventoryID
corresponding to a bank item or bag slot. The results of this function can be used with GetInventorySlotInfo()
and other related inventory functions.
See also Bank functions, Inventory functions.
Signature:
inventoryID
=
BankButtonIDToInvSlotID(buttonID
[,
isBag])
Arguments:
buttonID
- Numeric ID of an item or bag slot in the bank UI. The first item slot is numbered1
, while the first bag slot is numbered5
. (number
)isBag
- 1 if the given ID corresponds to a bank bag slot; nil if the ID corresponds to an item slot (1nil
)
Returns:
inventoryID
- An inventory slot ID usable with various Inventory API functions (number
, inventoryID)
Examples:
-- While mousing over a button in the bank local button = GetMouseFocus() print("Inventory Slot:", BankButtonIDToInvSlotID(button:GetID(), button.isBag))