Jass:SetForceAllianceStateBJ – Mappedia

Jass:SetForceAllianceStateBJ

Aus Mappedia
Wechseln zu: Navigation, Suche
Funktion: SetForceAllianceStateBJ
Parameter: force
force
integer
Rückgabewert: nothing
Autor: Blizzard
Quelle: Blizzard.j
Synchron: Unbekannt



Code

function SetForceAllianceStateBJ takes force sourceForce, force targetForce, integer allianceState returns nothing
    local integer sourceIndex
    local integer targetIndex

    set sourceIndex = 0
    loop

        if (sourceForce==bj_FORCE_ALL_PLAYERS or IsPlayerInForce(Player(sourceIndex), sourceForce)) then
            set targetIndex = 0
            loop
                if (targetForce==bj_FORCE_ALL_PLAYERS or IsPlayerInForce(Player(targetIndex), targetForce)) then
                    call SetPlayerAllianceStateBJ(Player(sourceIndex), Player(targetIndex), allianceState)
                endif

                set targetIndex = targetIndex + 1
                exitwhen targetIndex == bj_MAX_PLAYER_SLOTS
            endloop
        endif

        set sourceIndex = sourceIndex + 1
        exitwhen sourceIndex == bj_MAX_PLAYER_SLOTS
    endloop
endfunction

Parameter

Typ Name Beschreibung
force sourceForce
force targetForce
integer allianceState
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Warcraft-Mapping
Werkzeuge