//TESH.scrollpos=64
//TESH.alwaysfold=0
function Trig_Hero_Die_Loop_JASS_Func002Func001Func001Func001001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func001Func003001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func001C takes nothing returns boolean
if ( not ( udg_HR_EFFECT == true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func002Func002001001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func002C takes nothing returns boolean
if ( not ( udg_HR_MANA == true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func003C takes nothing returns boolean
if ( not ( udg_HR_SELECT == true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001Func004C takes nothing returns boolean
if ( not ( udg_HR_CAMERA == true ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Die_Loop_JASS_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitLifePercent(GetEnumUnit()) == 100.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hero_Die_Loop_JASS_Func002A takes nothing returns nothing
if ( Trig_Hero_Die_Loop_JASS_Func002Func001C() ) then
if ( Trig_Hero_Die_Loop_JASS_Func002Func001Func001C() ) then
call ReviveHeroLoc( GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnumUnit()), Condition(function Trig_Hero_Die_Loop_JASS_Func002Func001Func001Func003001001002))), udg_HR_REVIVE_POINT[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], true )
else
call ReviveHeroLoc( GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnumUnit()), Condition(function Trig_Hero_Die_Loop_JASS_Func002Func001Func001Func001001001002))), udg_HR_REVIVE_POINT[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], false )
endif
if ( Trig_Hero_Die_Loop_JASS_Func002Func001Func002C() ) then
call SetUnitManaPercentBJ( GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnumUnit()), Condition(function Trig_Hero_Die_Loop_JASS_Func002Func001Func002Func002001001002))), 100 )
else
endif
if ( Trig_Hero_Die_Loop_JASS_Func002Func001Func003C() ) then
call SelectUnitForPlayerSingle( udg_HR_HERO_PLAYER[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], GetOwningPlayer(GetEnumUnit()) )
else
endif
if ( Trig_Hero_Die_Loop_JASS_Func002Func001Func004C() ) then
call SmartCameraPanBJ( GetOwningPlayer(GetEnumUnit()), udg_HR_REVIVE_POINT[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))], 0.5 )
else
endif
call SetUnitAnimation( GetEnumUnit(), "death" )
call UnitApplyTimedLifeBJ( 0.75, 'BTLF', GetEnumUnit() )
else
call SetUnitLifePercentBJ( GetEnumUnit(), ( GetUnitLifePercent(GetEnumUnit()) + udg_HR_DUMMY_LIFE_INCREASE[GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit()))] ) )
endif
endfunction
function Trig_Hero_Die_Loop_JASS_Actions takes nothing returns nothing
set udg_HR_UNITG = GetUnitsOfTypeIdAll(udg_HR_DUMMY)
call ForGroupBJ( udg_HR_UNITG, function Trig_Hero_Die_Loop_JASS_Func002A )
call DestroyGroup(udg_HR_UNITG)
endfunction
//===========================================================================
function InitTrig_Hero_Die_Loop_JASS takes nothing returns nothing
set gg_trg_Hero_Die_Loop_JASS = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Hero_Die_Loop_JASS, 0.10 )
call TriggerAddAction( gg_trg_Hero_Die_Loop_JASS, function Trig_Hero_Die_Loop_JASS_Actions )
endfunction