下面是原文:(选取单位时执行的函数)
function Blood_Seeking_GetWounded takes nothing returns nothing
local real lFc=FDFD(GetEnumUnit(),udg_u_DTAX_temp)
if udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3==0 or GetUnitState(udg_u_DTAX_temp,UNIT_STATE_LIFE)<1 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),false)
else
if lFc>=udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 or(lFc<udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 and GetUnitStatePercent(GetEnumUnit(),UNIT_STATE_LIFE,UNIT_STATE_MAX_LIFE)>40)then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),false)
endif
if lFc<udg_i_DTAX_beastmaster_primal_roar_intel_gain_REF3*1500 and GetUnitLifePercent(GetEnumUnit())<=40 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_u_DTAX_temp),true)
set udg_b_DTAX_natures_guise_still_near_the_trees=true
endif
endif
endfunction
udg_b_DTAX_natures_guise_still_near_the_trees跟树精卫士有关,可见是使用了 UnitShareVision函数共享视野 |