|
发表于 2008-8-1 17:01:04
|
显示全部楼层
[codes=jass]
function H2I takes handle h returns integer
return h
return 0
endfunction
function H2S takes handle h returns string
return I2S(H2I(h))
endfunction
function GetUnit takes string pTable,string pKey returns unit
return GetStoredInteger(udg_GC,pTable,pKey)
return null
endfunction
function SetInteger takes string pTable,string pKey,integer pData returns nothing
call StoreInteger(udg_GC,pTable,pKey,pData)
endfunction
function Flush takes string pTable returns nothing
call FlushStoredMission(udg_GC,pTable)
endfunction
function CloseTimer takes timer t returns nothing
call PauseTimer(t)
call Flush(H2S(t))
call DestroyTimer(t)
endfunction
function Revive_Timer takes nothing returns nothing
local timer t = GetExpiredTimer()
local string s = H2S(t)
call ReviveHero(GetUnit(s, "Hero"), GetRectCenterX(bj_mapInitialPlayableArea),GetRectCenterY(bj_mapInitialPlayableArea),true)
call CloseTimer(t)
set t = null
endfunction
function Revive takes unit u returns nothing
local timer t = CreateTimer()
local string s = H2S(t)
call SetInteger(s,"Hero",H2I(u))
call TimerStart(t, 10.0, false, function Revive_Timer)
set t = null
endfunction
[/codes]
其实我是复制别出,现在不能开we |
|