|
发表于 2008-6-16 12:16:55
|
显示全部楼层
恩,bj函数里有一个SetHeroLevelBJ的
[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这个函数了 |
|