Skip to content

GetBagAndSlotFromItemGUID

Ghost edited this page Jun 22, 2023 · 2 revisions

Returns the bagID and slotIndex from an itemGUID, or nil if the item is not in the player's inventory. Returns on the first occurrence of the item.

Usage

local itemGUID = 1234; -- just imagine this is a real item GUID
local bagID, slotIndex = LibInventoryHelper.GetBagAndSlotFromItemGUID(itemGUID);

Returns:

  • bagID: The index of the bag containing the item.
  • slotIndex: The item index within the bag.

Clone this wiki locally