View Single Post
10-02-12, 03:24 PM   #1
andaril
A Murloc Raider
 
andaril's Avatar
Join Date: Oct 2012
Posts: 4
Combat icon for target

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:
  1. UnitAffectingCombat("unit")
http://www.wowwiki.com/API_UnitAffectingCombat

And in code
/ouf_drk/lib.lua
Lua Code:
  1. --combat icon
  2.     if f.mystyle=="player" then
  3.         f.Combat = h:CreateTexture(nil, 'OVERLAY')
  4.         f.Combat:SetSize(15,15)
  5.         f.Combat:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
  6.         f.Combat:SetTexCoord(0.58, 0.90, 0.08, 0.41)
  7.         f.Combat:SetPoint('BOTTOMRIGHT', 7, -7)
  8.     end

So i think all i need is to add some code like:
Lua Code:
  1. --combat icon
  2.     if f.mystyle=="target" and UnitAffectingCombat( %UNIT% ) then
  3.         f.Combat = h:CreateTexture(nil, 'OVERLAY')
  4.         f.Combat:SetSize(15,15)
  5.         f.Combat:SetTexture('Interface\\CharacterFrame\\UI-StateIcon')
  6.         f.Combat:SetTexCoord(0.58, 0.90, 0.08, 0.41)
  7.         f.Combat:SetPoint('BOTTOMRIGHT', 7, -7)
  8.     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.

Last edited by andaril : 10-02-12 at 03:27 PM.
  Reply With Quote