Search code examples
world-of-warcraft

World of Warcraft API: Return value from PutItemInBag()


Is there any return value from PutItemInBag(), possibly telling you if it succeeded or the bag was full?


Solution

  • There is a return value, but that only returns whether the cursor had an item. See FrameXML/MainMenuBarBagButtons.lua#L20

    hadItem = PutItemInBag(inventoryID)
    

    The UI_ERROR_MESSAGE event will fire with errorType 13 if a bag is full