UnitInventoryCount
- Parameters
-
whichUnit unit
- return type
integer
- Source code
function UnitInventoryCount takes unit whichUnit returns integer local integer index = 0 local integer count = 0 loop if (UnitItemInSlot(whichUnit, index) != null) then set count = count + 1 endif set index = index + 1 exitwhen index >= bj_MAX_INVENTORY endloop return count endfunction
- Source
- Blizzard.j
- wc3modding.com
- UnitInventoryCount