DogTag Support

-- Here's an example of how to deal with DogTag support.
-- Note that you have to consider which quote characters
-- you are using to contain the entire dog tag within,
-- as opposed what you're using inside. Here I'm using `'` surrounding
-- everything, and I'm using `"` within the dog tag itself.
-- Also, each new line inside a string should end with a '\'.
-- Also note; you'll have to "escape" where you wish to enter a '\' character
-- inside your dog tag. Do that by repeating the '\' character.
-- Example: return "\\ FOO \\"
-- Would print "\ FOO \"

if not UnitExists(unit) then return L["None"] end

local dt = '\
[IsUnit("player") and "<YOU>":ClassColor or Color(Name, %f, %f, %f ) \
(if PvP then \
 "++":Red \

local r, g, b
if UnitIsPlayer(unit) then
    r, g, b = ClassColor(unit)
    r, g, b = UnitSelectionColor(unit)

return dt:format(r, g, b)

You must login to post a comment. Don't have an account? Register to get one!


Date created
Jul 29, 2011
Last updated
Jul 29, 2011