Jesus4Lyf
Good Idea™
- Reaction score
- 397
Unit properties is a bad idea (out of the box) because of this.
It is unstable.
You can use Status instead to be safe.
And that function:
JASS:
function GetUnitId takes unit u returns integer
return GetHandleId(u)-0x100000
endfunction
It is unstable.
You can use Status instead to be safe.
And that function:
JASS:
function GetBiggestAttribute takes unit hero returns integer
local integer stat=GetHeroStr(hero,true)
local integer newStat=GetHeroAgi(hero,true)
if newStat>stat then
stat=newStat
endif
newStat=GetHeroInt(hero,true)
if newStat>stat then
return newStat
endif
return stat
endfunction