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 \
end)]'

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

return dt:format(r, g, b)


Comments

Posts Quoted:
Reply
Clear All Quotes