Thread Tools Display Modes
04-11-10, 11:17 AM   #1
weavil
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 14
kgpanels and threat

Not sure if this is the proper forum to ask, but here goes...

I want my panels to change color to red if I agro and revert back to w/e color they were If I die, tank regains agro, or I use a threat wipe ability.

tia
  Reply With Quote
04-11-10, 04:26 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
http://wowprogramming.com/docs/api_categories#threat
http://wowprogramming.com/docs/event...TUATION_UPDATE

My (untested) guess would be to put this in your OnLoad:
Code:
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE")
and this in your OnEvent:
Code:
local threat = UnitThreatSituation("player")
--(or you can use UnitThreatSituation("player", "target") if you just wish to check against your current target)
if threat > 1 then
   --change color
else
   --change back to original color
end
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgpanels and threat


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off