RSS

Суббота, 20.04.2024, 06:37
Главная » WoW API » API Функции » Банк »

BankButtonIDToInvSlotID

[ править ]
Returns the [[docs/api_types#inventoryID|`inventoryID`]] corresponding to a bank item or bag slot.
[клоны]
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.

Signature:
Code
inventoryID = BankButtonIDToInvSlotID(buttonID [, isBag])

Arguments:
  • buttonID - Numeric ID of an item or bag slot in the bank UI. The first item slot is numbered 1, while the first bag slot is numbered 5. (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))

Также смотрите: Банк , Inventory functions, Bank functions
Ссылки: http://wowprogramming.com/docs/api/BankButtonIDToInvSlotID