View Single Post
04/13/14, 06:07 PM   #18
beeradg
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 16
Originally Posted by TheBelgarion View Post
Hi,

i moved my item with the functions mentioned above and it works ... but than moving more than one
FindFirstEmptySlotInBag(2) always reports the same position to insert new item, which does not work naturally ... how can I update bag so its finds a new empty SLot?

-- must call secure protected (pickup the item via cursor)
result = CallSecureProtected("PickupInventoryItem", item.bag, item.slot, item.stack)
if (result) then
-- must call secure protected (drop the item on the cursor)
result = CallSecureProtected("PlaceInInventory", toBag, toSlot)
end
You probably need to implement some time buffering or wait for the update single item inventory event before moving the next item.
  Reply With Quote