Добавлен MATRITSA
эта функция как работает что она делает можете объяснить
Принятый ответ
Это переменная которая используется для добавления в вгруппу юнитов заданного типа.
раскрыть
function GetUnitsOfTypeIdAllFilter takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit()) == bj_groupEnumTypeId
endfunction
function GetUnitsOfTypeIdAll takes integer unitid returns group
local group result = CreateGroup()
local group g = CreateGroup()
local integer index
set index = 0
loop
set bj_groupEnumTypeId = unitid
call GroupClear(g)
call GroupEnumUnitsOfPlayer(g, Player(index), filterGetUnitsOfTypeIdAll)
call GroupAddGroup(g, result)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call DestroyGroup(g)
return result
endfunction
function GetUnitsOfPlayerAndTypeIdFilter takes nothing returns boolean
return GetUnitTypeId(GetFilterUnit()) == bj_groupEnumTypeId
endfunction
function GetUnitsOfPlayerAndTypeId takes player whichPlayer, integer unitid returns group
local group g = CreateGroup()
set bj_groupEnumTypeId = unitid
call GroupEnumUnitsOfPlayer(g, whichPlayer, filterGetUnitsOfPlayerAndTypeId)
return g
endfunction
function InitBlizzardGlobals takes nothing returns nothing
// ...
set filterGetUnitsOfTypeIdAll = Filter(function GetUnitsOfTypeIdAllFilter)
set filterGetUnitsOfPlayerAndTypeId = Filter(function GetUnitsOfPlayerAndTypeIdFilter)
// ...
endfunction
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Отредактирован Феникс
Отредактирован Феникс
Отредактирован MATRITSA
Создание вопроса, ответ на который есть в базе статей. простите но
этот пункт зависит от ума человека