|
O54啊,那些神马的都是哈希函数
[jass]function WYjiwei takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local unit p5=PT4(114433,"Source")
if GetTriggerEvalCount(t)>8 then
call DebugMsg()
call SetUnitVertexColor(p5,255,255,255,255)//这里的Debug函数检测执行了,BUt!设置颜色和移除技能肿么没效果呢 VI4是Clear哈希,H8I是清理触发
call UnitRemoveAbility(p5,'Agho')
call VI4(114433)
call H8I(t)
endif
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call DebugMsg()
call SetUnitVertexColor(p5,255,255,255,255)
call UnitRemoveAbility(p5,'Agho')
call VI4(114433)
call H8I(t)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Slow\\SlowCaster.mdl",p5,"overhead"))
if P64(114433,"count")-80>10 then
call SetUnitVertexColor(p5,255,255,255,P64(114433,"count")-40)
call O54(114433,"count",P64(114433,"count")-40)
endif
if GetTriggerEvalCount(t)>5-GetUnitAbilityLevel(p5,'A0NT') or GetTriggerEvalCount(t)>5-GetUnitAbilityLevel(p5,'A0NX') then
call UnitAddAbility(p5,'Agho')
endif
set p5=null
set t=null
return false
endfunction[/jass]
[jass]call O54(114433,"count",255)
set tt=CreateTrigger()
call P74(114433,"Source",p5)
call TriggerRegisterTimerEvent(tt,1,true)
call TriggerRegisterUnitEvent(tt,p5,EVENT_UNIT_SPELL_ENDCAST)
call TriggerAddCondition(tt,Condition(function WYjiwei))[/jass] |
|