Verifies the item inventory (= Bag) for the number of occupied bag item slots.
local occupiedSlots, totalSlots = GetBagCount()
- nil - No input required.
- number - The number of bag item slots that currently are occupied by an item.
- number - The total number of bag item slots available in the bag.
function BackPackState() local used, total = GetBagCount(); if ( (total - used) ~= 0 ) then return true; else return false; end; end; if ( BackPackState() ) then // Loot All end;
- activatedBagPages = totalSlots / 30
- freeSlots = totalSlots - occupiedSlots
- The bag is filled with items from the inbox or from loot via the bag queue. Make sure the bag queue is not overloaded. It seems it can hold up to 20 items. If you grab more items, the elder entries in the queue will get lost! You may want to check the event Event:BAG_ITEM_UPDATE or Event:PLAYER_BAG_CHANGED.