View Single Post
Old 10-05-08, 06:44 AM   #27
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,176
Originally Posted by Slakah View Post
You could add some custom tags:

Code:
oUF.Tags["[AFK]"] = function(u) return UnitIsAFK(u) and "AFK" or ""
oUF.Tags["[DND]"] = function(u) return UnitIsDND(u) and "DND" or ""

oUF.TagEvents["[AFK]"] = "UNIT_FLAGS"
oUF.TagEvents["[DND]"] = "UNIT_FLAGS"
(note: I'm not certain if the event is correct as I don't have access to WoW currently.)

and then use those tags as you would normally.
PLAYER_FLAGS_CHANGED is the event

(dont be fooled by the name of the event, it works for any unit)
p3lim is offline