|
function Trig_lpi_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_lpi_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e000', GetTriggerPlayer(), GetSpellTargetLoc(), bj_UNIT_FACING )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "tranquility" )
endfunction
//===========================================================================
function InitTrig_lpi takes nothing returns nothing
set gg_trg_lpi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lpi, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_lpi, Condition( function Trig_lpi_Conditions ) )
call TriggerAddAction( gg_trg_lpi, function Trig_lpi_Actions )
endfunction |
|