|
发表于 2008-3-21 12:55:05
|
显示全部楼层
[codes=jass]function lightscreen takes nothing returns nothing
local unit I2Uunit=I2U(GetStoredInteger(udg_GC,I2S(H2I(GetExpiredTimer)), "lightscreenMY"))
call UnitRemoveAbility( I2Uunit, 'A02X' )
endfunction
function Trig_lightscreen_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02V' ) ) then
return false
endif
return true
endfunction
function Trig_lightscreen_Actions takes nothing returns nothing
local timer skilltimer=CreateTimer()
call StoreInteger(udg_GC,I2S(H2I(skilltimer)), "lightscreenMY", H2I(GetTriggerUnit()) )
call UnitAddAbility( GetTriggerUnit(), 'A02X' )
call SetPlayerAbilityAvailableBJ( false, 'A02X', GetTriggerPlayer() )
call TimerStart(skilltimer, 30, false, function lightscreen)
set skilltimer=null
endfunction
//===========================================================================
function InitTrig_lightscreen takes nothing returns nothing
local trigger Initlightscreen = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( Initlightscreen, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( Initlightscreen, Condition( function Trig_lightscreen_Conditions ) )
call TriggerAddAction( Initlightscreen, function Trig_lightscreen_Actions )
endfunction[/codes]
这样可以吗?? |
|