找回密码
 点一下
查看: 1592|回复: 1

神奇的技能越放越卡!

[复制链接]
发表于 2011-3-31 12:33:23 | 显示全部楼层 |阅读模式
function aaa1 takes nothing returns nothing
  local timer t=GetExpiredTimer()
  local unit dw=I2U(GetStoredInteger(udg_GC,I2S(H2I(t)),"dw"))
  local integer i=GetStoredInteger(udg_GC,I2S(H2I(t)),"zs")
  local real jd=GetStoredReal(udg_GC,I2S(H2I(t)),"jd")
  local real x
  local real y
  if i>75 then
    set x=GetUnitX(dw)
    set y=GetUnitX(dw)
    call UnitDamagePoint( dw, 0, 500.00, x, y, 300.00, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
    call SetUnitPathing( dw, true )
    call UnitRemoveAbility( dw, 'A00Z' )
    call UnitRemoveAbility( dw, 'A03Z' )
    call SetUnitTimeScale( dw, 1 )
    call SetUnitInvulnerable( dw, false )
    call SetUnitFlyHeight( dw, 0.00, 10000.00 )
    set dw=null
    call PauseTimer(t)
    call DestroyTimer(t)
    call FlushStoredMission(udg_GC,I2S(H2I(t)))
    set t=null
  else
    set x=GetUnitX(dw)+Cos(Deg2Rad(jd))*15
    set y=GetUnitY(dw)+Sin(Deg2Rad(jd))*15
    call SetUnitX( dw, x )
    call SetUnitY( dw, y )
    if i>35 then
      call SetUnitFlyHeight( dw, 5*(75-i), 1000.00 )
    else
      call SetUnitFlyHeight( dw, 5*i, 1000.00 )
    endif
    set i=i+1
    call StoreInteger(udg_GC,I2S(H2I(t)),"zs",i)
  endif   
  set t=null
  set dw=null
endfunction



function aaa takes nothing returns nothing
    local unit dw=GetTriggerUnit()
    local timer t=CreateTimer()
    local location loc=GetUnitLoc(dw)
    local location loc1=GetSpellTargetLoc()
    local real x=GetLocationX(loc1)
    local real y=GetLocationY(loc1)
    local real jd=AngleBetweenPoints(loc,loc1 )
    call SetUnitTimeScale( dw, 0.30 )
    call SetUnitInvulnerable( dw, true )
    call UnitAddAbility( dw, 'A00Z' )
    call UnitAddAbility( dw, 'A03Z' )
    call SetUnitPathing( dw, false )
    call StoreInteger(udg_GC,I2S(H2I(t)),"dw",H2I(dw))
    call StoreReal(udg_GC,I2S(H2I(t)),"jd",jd)
    call StoreReal(udg_GC,I2S(H2I(t)),"x",x)
    call StoreReal(udg_GC,I2S(H2I(t)),"y",y)
    call StoreInteger(udg_GC,I2S(H2I(t)),"zs",0)
    call TimerStart(t,0.01,true,function aaa1)
    call RemoveLocation(loc)
    call RemoveLocation(loc1)
    set t=null
    set dw=null
    set loc=null
    set loc1=null
endfunction
发表于 2011-4-4 08:31:28 | 显示全部楼层
技能名字就叫做“卡爆你”吧。
卡无非处理器或者内存抗不~~住了。
处理器,让Jass运行的慢一点。
内存,看看有没有泄漏和大量的内存读写(1.20缓存的时候卡过)。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-22 05:08 , Processed in 0.308399 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表