View Single Post
04-13-16, 03:58 PM   #15
ykiigor
A Murloc Raider
Join Date: Jun 2014
Posts: 9
Originally Posted by icyblade View Post
local value = UnitPowerMax(unit)
In Legion we should do something like this:
Lua Code:
  1. local value = UnitPowerMax(unit, UnitPowerType(unit))
Power type isn't mandatory, you can use UnitPowerMax(unit) as before

Originally Posted by icyblade View Post
[*] 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:
  1. local _, _, icon = GetSpellInfo(spell_id)
  2. texture:SetTexuture(icon)
In Legion, that's easier:
Lua Code:
  1. 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.

Last edited by ykiigor : 04-13-16 at 04:01 PM.