View Single Post
06/22/15, 11:44 AM   #5
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Excellent! Thanks for the information. I will work on this this evening. I really appreciate it.

Originally Posted by Ayantir View Post
Please avoid

Lua Code:
  1. local bagSlots = GetBagSize(bagId) -1
  2. for slotIndex = 0, bagSlots do
  3.     local itemType = GetItemType(bagId, slotIndex)

to itarate bags.

Use :

Lua Code:
  1. local bagCache = SHARED_INVENTORY:GenerateFullSlotData(nil, BAG_BACKPACK)
  2. for slotId, data in pairs(bagCache) do

instead.

1st, the first snipped don't really work work Guild Bank.
2nd, sometimes , it don't work neither in bag. (even it's more rare).

And most of all, please consider that slotIndex is data.slotIndex and not in the key.
  Reply With Quote