Hello.
I'm using ouf_drk fan update.
http://www.wowinterface.com/download...Fanupdate.html
I need to add combat state icon for my target. How to do it with ouf?
I found in wow functions:
Lua Code:
UnitAffectingCombat("unit")
http://www.wowwiki.com/API_UnitAffectingCombat
And in code
/ouf_drk/lib.lua
Lua Code:
--combat icon
if f.mystyle=="player" then
f.Combat = h:CreateTexture(nil, 'OVERLAY')
f.Combat:SetSize(15,15)
f.Combat:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
f.Combat:SetTexCoord(0.58, 0.90, 0.08, 0.41)
f.Combat:SetPoint('BOTTOMRIGHT', 7, -7)
end
So i think all i need is to add some code like:
Lua Code:
--combat icon
if f.mystyle=="target" and UnitAffectingCombat( %UNIT% ) then
f.Combat = h:CreateTexture(nil, 'OVERLAY')
f.Combat:SetSize(15,15)
f.Combat:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
f.Combat:SetTexCoord(0.58, 0.90, 0.08, 0.41)
f.Combat:SetPoint('BOTTOMRIGHT', 7, -7)
end
And the question: is what i should put into %UNIT%?
It's new for me and i don't know where ouf/ouf_layout stores "unit" and how to get it.
I tried some variants, but no results. And search didn't give me results too, mb cos of my bad english. ;(
Thanks for help.