Change all use of heroclass to use RAID_CLASS_COLORS instead. This can be changed to CUSTOM_CLASS_COLORS later with a color picker for each class, but to support CoA classes need to go back to being colored properly.
Fix remaining lua errors covered by ascension patches Add Addon Skins Add Enhanced Friends List
This commit is contained in:
@@ -50,7 +50,7 @@ function M:UpdateBubbleBorder()
|
||||
wordMatch = classMatch and lowerCaseWord
|
||||
|
||||
if wordMatch and not E.global.chat.classColorMentionExcludedNames[wordMatch] then
|
||||
classColorTable = E.media.herocolor
|
||||
classColorTable = RAID_CLASS_COLORS[classMatch]
|
||||
word = gsub(word, gsub(tempWord, "%-", "%%-"), format("\124cff%.2x%.2x%.2x%s\124r", classColorTable.r*255, classColorTable.g*255, classColorTable.b*255, tempWord))
|
||||
end
|
||||
|
||||
@@ -76,7 +76,7 @@ function M:AddChatBubbleName(chatBubble, guid, name)
|
||||
if guid and guid ~= "" then
|
||||
local _, class = GetPlayerInfoByGUID(guid)
|
||||
if class then
|
||||
color = E:RGBToHex(E.media.herocolor.r, E.media.herocolor.g, E.media.herocolor.b)
|
||||
color = RAID_CLASS_COLORS[class].hex
|
||||
end
|
||||
else
|
||||
color = "|cffffffff"
|
||||
|
||||
@@ -141,7 +141,7 @@ local function buttonOnEnter(self)
|
||||
|
||||
for playerName, rollData in pairs(self.parent.rollResults) do
|
||||
if self.rollType == rollData[1] and rollData[2] then
|
||||
local classColor = E.media.herocolor
|
||||
local classColor = RAID_CLASS_COLORS[rollData[2]]
|
||||
GameTooltip:AddLine(playerName, classColor.r, classColor.g, classColor.b)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -49,12 +49,13 @@ end
|
||||
|
||||
function THREAT:GetColor(unit)
|
||||
if UnitIsPlayer(unit) then
|
||||
local class = E.media.herocolor
|
||||
if not class then
|
||||
local _, class = UnitClass(unit)
|
||||
local color = UnitIsUnit("player", unit) and E.media.herocolor or RAID_CLASS_COLORS[class]
|
||||
if not color then
|
||||
return 194, 194, 194
|
||||
end
|
||||
|
||||
return class.r*255, class.g*255, class.b*255
|
||||
return color.r*255, color.g*255, color.b*255
|
||||
end
|
||||
|
||||
local unitReaction = UnitReaction(unit, "player")
|
||||
|
||||
Reference in New Issue
Block a user