Thread Tools Display Modes
03-18-15, 07:00 AM   #1
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Question Get first free slotID from NormalBag

Hi!

Can't find how to get first free slotID from Bag?
I want to split items into 2 slots, i use this function:
But can't find how to place splited item count, which is in cursor to free slot (to have them actually splitted)
  Reply With Quote
03-18-15, 07:18 AM   #2
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Created script how to find empty bag, but now cant find how to check if i can put specific item to this bag (by item id) if anyone know please help, thank you!

Code:
for b=0,4 do 
   for s=1,GetContainerNumSlots(b) do 
      local link =GetContainerItemLink(b,s);
      if not link
         print(s ..": is empty");
      end
   end 
end
  Reply With Quote
03-18-15, 08:22 AM   #3
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 223
This will give you a containers family, the ItemTypes it can hold, using the bagSlot(bagID).
Code:
GetItemFamily(GetInventoryItemID("player", ContainerIDToInventoryID(bagID)))
Using the above you can compare it to an items family by using the itemID
Code:
GetItemFamily(GetContainerItemID(bagID, slotID))
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison
  Reply With Quote
03-19-15, 03:57 PM   #4
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Got it, thanks !
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Get first free slotID from NormalBag

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off