Returns the inventoryID corresponding to a bank item or bag slot

Signature:

inventoryID = BankButtonIDToInvSlotID(buttonID [, isBag])

Arguments:

  • buttonID - Numeric ID of an item or bag slot in the bank UI (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))