找回密码
 点一下
楼主: 7n.mosoul

[菜]ReturnBUG的缓存使用问题-__________-

[复制链接]
发表于 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]

这样可以吗??
回复

使用道具 举报

 楼主| 发表于 2008-3-21 12:58:26 | 显示全部楼层
之前试过这种方法``不行
回复

使用道具 举报

发表于 2008-3-21 13:01:39 | 显示全部楼层
这样应该是没有什么问题的(除了没有排泄之类)
缓存是不是没有初始化呢???
回复

使用道具 举报

 楼主| 发表于 2008-3-21 13:09:18 | 显示全部楼层
确实是有初始化的````可是在保存时还是会出错
回复

使用道具 举报

发表于 2008-3-21 13:15:56 | 显示全部楼层
要去上课了,随手写的,看一下吧~~

test.w3x (18 KB, 下载次数: 10)
回复

使用道具 举报

 楼主| 发表于 2008-3-21 13:37:01 | 显示全部楼层
谢谢 终于解决了
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-9 05:43 , Processed in 0.030568 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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