Jass:IssueHauntOrderAtLocBJ – Mappedia

Jass:IssueHauntOrderAtLocBJ

Aus Mappedia
Wechseln zu: Navigation, Suche
Funktion: IssueHauntOrderAtLocBJ
Parameter: unit
location
Rückgabewert: boolean
Autor: Blizzard
Quelle: Blizzard.j
Synchron: Unbekannt



Code

function IssueHauntOrderAtLocBJ takes unit whichPeon, location loc returns boolean
    local group g = null
    local unit goldMine = null

    // Search for a gold mine within a 1-cell radius of the specified location.
    set g = CreateGroup()
    call GroupEnumUnitsInRangeOfLoc(g, loc, 2*bj_CELLWIDTH, filterIssueHauntOrderAtLocBJ)
    set goldMine = FirstOfGroup(g)
    call DestroyGroup(g)

    // If no mine was found, abort the request.
    if (goldMine == null) then
        return false
    endif

    // Issue the Haunt Gold Mine order.
    return IssueTargetOrderById(whichPeon, 'ugol', goldMine)
endfunction

Parameter

Typ Name Beschreibung
unit whichPeon
location loc
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Warcraft-Mapping
Werkzeuge