Addon-skins (#4)
* Skin atlasloot for ascension. * Add custom class colors from elvui to WIM.
This commit is contained in:
@@ -296,6 +296,27 @@ S:AddCallbackForAddon("WIM", "WIM", function()
|
||||
local function ApplySkin(self)
|
||||
self.db.skin.selected = "WIM ElvUI"
|
||||
self.RegisterSkin(WIM_Elvui)
|
||||
|
||||
WIM.constants.classes.GetMyColoredName = function()
|
||||
local name = UnitName("player")
|
||||
local color = E.media.herocolor
|
||||
if color then
|
||||
return string.format("\124cff%.2x%.2x%.2x", color.r*255, color.g*255, color.b*255)..name.."\124r"
|
||||
end
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
WIM.constants.classes.GetColoredNameByChatEvent = function(event, ...)
|
||||
local player, guid = select(2, ...), select(12, ...)
|
||||
local _, class = GetPlayerInfoByGUID(guid)
|
||||
local color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
|
||||
if color then
|
||||
return color:WrapText(player)
|
||||
end
|
||||
|
||||
return player
|
||||
end
|
||||
end
|
||||
|
||||
if WIM.db then
|
||||
|
||||
Reference in New Issue
Block a user