Commit 4431cc3c authored by Blazeflack's avatar Blazeflack

Added a bunch of new tags for easy access to class colors

[classcolor:player] - Uses the class color of the player
[classcolor:<class>] - Uses the class color of the supplied class.
    Example: [classcolor:warlock]
parent 3a0f54ab
......@@ -211,4 +211,61 @@ ElvUF.Tags.Methods["deficit:name:colors"] = function(unit)
end
return String
end
ElvUF.Tags.Methods["classcolor:player"] = function()
local _, unitClass = UnitClass("player")
local String
if unitClass then
String = Hex(_COLORS.class[unitClass])
else
String = "|cFFC2C2C2"
end
return String
end
ElvUF.Tags.Methods["classcolor:hunter"] = function()
return Hex(_COLORS.class["HUNTER"])
end
ElvUF.Tags.Methods["classcolor:warrior"] = function()
return Hex(_COLORS.class["WARRIOR"])
end
ElvUF.Tags.Methods["classcolor:paladin"] = function()
return Hex(_COLORS.class["PALADIN"])
end
ElvUF.Tags.Methods["classcolor:mage"] = function()
return Hex(_COLORS.class["MAGE"])
end
ElvUF.Tags.Methods["classcolor:priest"] = function()
return Hex(_COLORS.class["PRIEST"])
end
ElvUF.Tags.Methods["classcolor:warlock"] = function()
return Hex(_COLORS.class["WARLOCK"])
end
ElvUF.Tags.Methods["classcolor:shaman"] = function()
return Hex(_COLORS.class["SHAMAN"])
end
ElvUF.Tags.Methods["classcolor:deathknight"] = function()
return Hex(_COLORS.class["DEATHKNIGHT"])
end
ElvUF.Tags.Methods["classcolor:hunter"] = function()
return Hex(_COLORS.class["DRUID"])
end
ElvUF.Tags.Methods["classcolor:hunter"] = function()
return Hex(_COLORS.class["MONK"])
end
ElvUF.Tags.Methods["classcolor:hunter"] = function()
return Hex(_COLORS.class["ROGUE"])
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment