UpdateEachStockBuilding

Parameters
iType itemtype
iLevel integer
comment
bug

Leaks handle g: In Jass you must set local variables that hold agents (or any child type) to null at the end of functions to avoid reference counter leaks.

patch

1.07

Source
Blizzard.j
return type
nothing
Source code
function UpdateEachStockBuilding takes itemtype iType, integer iLevel returns nothing
    local group g

    set bj_stockPickedItemType = iType
    set bj_stockPickedItemLevel = iLevel

    set g = CreateGroup()
    call GroupEnumUnitsOfType(g, "marketplace", null)
    call ForGroup(g, function UpdateEachStockBuildingEnum)
    call DestroyGroup(g)
endfunction