CreateUnitAtLocSaveLast

Parameters
id player
unitid integer
loc location
face real
return type
unit
Source code
function CreateUnitAtLocSaveLast takes player id, integer unitid, location loc, real face returns unit
    if (unitid == 'ugol') then
        set bj_lastCreatedUnit = CreateBlightedGoldmine(id, GetLocationX(loc), GetLocationY(loc), face)
    else
        set bj_lastCreatedUnit = CreateUnitAtLoc(id, unitid, loc, face)
    endif

    return bj_lastCreatedUnit
endfunction
Source
Blizzard.j
wc3modding.com
CreateUnitAtLocSaveLast