Skip to content

Commit

Permalink
PVP: use rgb values instead
Browse files Browse the repository at this point in the history
colorStr is injected by Weakauras, so it cannot be reliably used
  • Loading branch information
Zidras committed Sep 11, 2024
1 parent dd8c8d8 commit cfa6d39
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions DBM-PvP/PvPGeneral.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local L = mod:GetLocalizedStrings()
local DBM = DBM
local AceTimer = LibStub("AceTimer-3.0")

mod:SetRevision("20240911192931")
mod:SetRevision("20240911213453")
mod:SetZone(DBM_DISABLE_ZONE_DETECTION)

mod:RegisterEvents(
Expand Down Expand Up @@ -250,13 +250,9 @@ local function colorizeFlagName(name)
end

if classUpper then
if CUSTOM_CLASS_COLORS then
local classTextColor = CUSTOM_CLASS_COLORS[classUpper]
local hexClassColor = format("ff%02X%02X%02X", 255 * classTextColor.r, 255 * classTextColor.g, 255 * classTextColor.b)
name = format("|c%s%s|r", hexClassColor, name)
else
name = format("|c%s%s|r", RAID_CLASS_COLORS[classUpper].colorStr, name)
end
local classTextColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[classUpper] or RAID_CLASS_COLORS[classUpper]
local hexClassColor = format("ff%02X%02X%02X", 255 * classTextColor.r, 255 * classTextColor.g, 255 * classTextColor.b)
name = format("|c%s%s|r", hexClassColor, name)
else
DBM:Debug("Couldn't find class for "..name..", requesting data from server")
requestedScoreData = true
Expand Down

0 comments on commit cfa6d39

Please sign in to comment.