Originally Posted by icyblade
local value = UnitPowerMax(unit)
In Legion we should do something like this:
Lua Code:
local value = UnitPowerMax(unit, UnitPowerType(unit))
|
Power type isn't mandatory, you can use UnitPowerMax(unit) as before
Originally Posted by icyblade
[*] We can use texture:SetTexture(spellId) now, so GetSpellInfo will not return a texture path as the 3rd return value
We use this code to set an icon now:
Lua Code:
local _, _, icon = GetSpellInfo(spell_id) texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
texture:SetTexuture(spell_id)
|
That is not spellID, it's FileID. So it's only easer if you know exact fileID for texture, otherwise you still need call GetSpellTexture. You can use string path as before.