|
本帖最后由 feiruzhou 于 2013-8-18 17:15 编辑
function shanghai1 takes nothing returns nothing
local timer tm=GetExpiredTimer()
local unit uu=I2U(GetStoredInteger(udg_GC, I2S(H2I(tm)), "unitd"))
call UnitDamageTargetBJ( uu, GetEnumUnit(), ( I2R(GetHeroInt(uu, true)) * 2.00 ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL )
set uu=null
set tm=null
endfunction
function ttt1 takes nothing returns nothing
local timer tm=GetExpiredTimer()
local integer N =GetStoredInteger(udg_GC, I2S(H2I(tm)), "cishu")
local location d= I2L(GetStoredInteger(udg_GC, I2S(H2I(tm)), "location"))
local group danweizu
if N>0 then
set danweizu=GetUnitsInRangeOfLocMatching(600.00, d, Condition(function shanghai))
call ForGroupBJ( danweizu, function shanghai1 )
set N=N-1
call StoreInteger(udg_GC,I2S(H2I(tm)), "cishu",N)
call GroupClear( danweizu )
call DestroyGroup( danweizu )
set danweizu=null
else
call FlushStoredMission(udg_GC,I2S(H2I(tm)))
call DestroyTimer(tm)
endif
set tm=null
endfunction
function ttt takes nothing returns nothing
local timer tm=CreateTimer()
local location dian = GetSpellTargetLoc()
local player p = GetOwningPlayer(GetSpellAbilityUnit())
local unit uu = GetSpellAbilityUnit()
local integer N = 10
call StoreInteger(udg_GC,I2S(H2I(tm)), "cishu", N)
call StoreInteger(udg_GC,I2S(H2I(tm)), "location", H2I(dian))
call StoreInteger(udg_GC,I2S(H2I(tm)), "player", H2I(p))
call StoreInteger(udg_GC,I2S(H2I(tm)), "unitd", H2I(uu))
call TimerStart(tm,1,true,function ttt1)
set dian=null
set uu=null
set tm=null
endfunction
如上下面GetExpiredTimer()得都的是同一个Timer。我想问的是上面的那个GetExpiredTimer()得到的是不是也是和下面一样的Timer
|
|