GetUnitsInRectOfPlayer

Parameters
r rect
whichPlayer player
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.

comment
note

Creates a new group object and returns it. The caller must remove it on its own after use.

patch

1.00

return type
group
Source code
function GetUnitsInRectOfPlayer takes rect r, player whichPlayer returns group
    local group g = CreateGroup()
    set bj_groupEnumOwningPlayer = whichPlayer
    call GroupEnumUnitsInRect(g, r, filterGetUnitsInRectOfPlayer)
    return g
endfunction
Source
Blizzard.j
wc3modding.com
GetUnitsInRectOfPlayer