|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
if bagId == BAG_GUILDBANK then elseif bagId == BAG_VIRTUAL then else if slotIndex == nil then return 0 end local bagSlots if bagId == BAG_BUYBACK then else end if bagSlots then if slotIndex < (bagSlots - 1) then return slotIndex + 1 else return nil end end endenddo -- reminder, iterator functions take `state, index` and return `index, ...` end end end if slotIndex < lastSlotIndex then return slotIndex + 1 else return nil end end -- reminder: this iterator factory returns `iterator, state, initialIndex` if bagId == BAG_GUILDBANK then elseif bagId == BAG_VIRTUAL then elseif bagId == BAG_FURNITURE_VAULT then else local lastSlotIndex if bagId == BAG_BUYBACK then else end end endend |