Addon-skins (#4)

* Skin atlasloot for ascension.
* Add custom class colors from elvui to WIM.
This commit is contained in:
salt-die
2022-10-31 05:02:07 -05:00
committed by GitHub
parent 3958b884a2
commit aeb5ac5918
2 changed files with 119 additions and 95 deletions
+21
View File
@@ -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