CreateBuildCommandButtonEffectBJ

Parameters
unitId integer
comment
patch

1.32.0.13369

Source
Blizzard.j
return type
commandbuttoneffect
Source code
function CreateBuildCommandButtonEffectBJ takes integer unitId returns commandbuttoneffect
	local race r = GetPlayerRace(GetLocalPlayer())
	local integer abilityId
	if (r == RACE_HUMAN) then
        set abilityId = 'AHbu'
    elseif (r == RACE_ORC) then
        set abilityId = 'AObu'
    elseif (r == RACE_UNDEAD) then
        set abilityId = 'AUbu'
    elseif (r == RACE_NIGHTELF) then
        set abilityId = 'AEbu'
    else
        set abilityId = 'ANbu'
    endif
    set bj_lastCreatedCommandButtonEffect = CreateCommandButtonEffect(abilityId, UnitId2String(unitId))
    return bj_lastCreatedCommandButtonEffect
endfunction