SetHeroLevelBJ

Parameters
whichHerounit
newLevelinteger
showEyeCandyboolean
comment
patch

1.07

Source
Blizzard.j (raise an issue to discuss on Github or submit a PR)
return type
nothing
Source code
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