function Trig_revive_Conditions takes nothing returns boolean
if (GetUnitTypeId(GetTriggerUnit())=='U000')or(GetUnitTypeId(GetTriggerUnit())=='E002')or(GetUnitTypeId(GetTriggerUnit())=='h023')or(GetUnitTypeId(GetTriggerUnit())=='H024')or(GetUnitTypeId(GetTriggerUnit())=='O00W')or(GetUnitTypeId(GetTriggerUnit())=='O00Y')or(GetUnitTypeId(GetTriggerUnit())=='O00Z')or(GetUnitTypeId(GetTriggerUnit())=='O010')or(GetUnitTypeId(GetTriggerUnit())=='O011')then
return false
endif
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))==MAP_CONTROL_USER)
endfunction
function Trig_revive_Func001C takes nothing returns boolean
return(udg_Made==3)
endfunction
function Trig_revive_Func009C takes nothing returns boolean
return(udg_Made==2)
endfunction
function Trig_revive_Actions takes nothing returns nothing
local location a
set a = GetRectCenter(gg_rct________113)
if(Trig_revive_Func001C())then
call SetUnitLifePercentBJ(gg_unit_H00F_0198,(GetUnitLifePercent(gg_unit_H00F_0198)*.5))
endif
set udg_die=(udg_die+1)
set udg_die=ModuloInteger(udg_die,30)
set udg_hero[udg_die]=GetTriggerUnit()
call TriggerSleepAction(30.)
set udg_revive=(udg_revive+1)
set udg_revive=ModuloInteger(udg_revive,30)
if(Trig_revive_Func009C())then
set udg_LSdian=GetRectCenter(gg_rct_nv_shen)
call ReviveHeroLoc(udg_hero[udg_revive],udg_LSdian,true)
call RemoveLocation(udg_LSdian)
else
call ReviveHeroLoc(udg_hero[udg_revive],a,true)
call RemoveLocation(a)
endif
set a = null
endfunction
function InitTrig_revive takes nothing returns nothing
set gg_trg_revive=CreateTrigger()
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(0),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(1),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(2),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(3),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(4),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(5),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(6),EVENT_PLAYER_UNIT_DEATH)
call TriggerRegisterPlayerUnitEventSimple(gg_trg_revive,Player(7),EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_revive,Condition(function Trig_revive_Conditions))
call TriggerAddAction(gg_trg_revive,function Trig_revive_Actions)
endfunction