|
发表于 2008-7-6 20:02:28
|
显示全部楼层
具体点吧,ls8楼9楼有相关内容
其实就是直接设置等级(GUI)
如果不用T而用jass的话,看一下这个函数就明白了
[codes=jass]function SetHeroLevelBJ takes unit whichHero, integer newLevel, boolean showEyeCandy returns nothing
local integer oldLevel = GetHeroLevel(whichHero)
if (newLevel > oldLevel) then
call SetHeroLevel(whichHero, newLevel, showEyeCandy)
elseif (newLevel < oldLevel) then
call UnitStripHeroLevel(whichHero, oldLevel - newLevel)
else
// No change in level - ignore the request.
endif
endfunction[/codes]
SetHeroLevel函数只能升级,而UnitStripHeroLevel函数则是专门用来降级的 |
|