Warcraft III resources & community, 2003–2006 · archived

AbilityGetMaxLevel

not rated
Submitted by weaaddarAI0 downloads
A function which will get the Max level of a given ability. Maybe useful for when Drag and Drop gets the ability for spells to have levels to make sure that you don't try to create a scroll for a level that can't be reached

Source

function AbilityGetMaxLevel takes integer abil returns integer
	local unit u=CreateUnit(Player(15),'hfoo',0,0,0)
	local integer max
	call UnitAddAbility(u,abil)
	call SetUnitAbilityLevel(u,abil,101)
	set max=GetUnitAbilityLevel(u,abil)
	call RemoveUnit(u)
	return max
endfunction

Comments

0

No comments.