mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-08 14:40:01 +00:00
move away from RAID_CLASS_COLORS dependency
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ pfUI:RegisterModule("afkcam", function ()
|
||||
local class = GetUnitData(arg2 or "")
|
||||
local author, msg
|
||||
if class and class ~= UNKNOWN then
|
||||
local class_color = RAID_CLASS_COLORS[class]:GenerateHexColorMarkup()
|
||||
local class_color = PFUI_CLASS_COLORS[class]:GenerateHexColorMarkup()
|
||||
author = string.format("%s%s|r",class_color,arg2)
|
||||
else
|
||||
author = arg2
|
||||
|
||||
+3
-2
@@ -430,7 +430,8 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
|
||||
local _, class = UnitClass("player")
|
||||
_G["ChatFrame" .. i .. "TabText"]:SetTextColor((RAID_CLASS_COLORS[class].r + .3) * .5, (RAID_CLASS_COLORS[class].g + .3) * .5, (RAID_CLASS_COLORS[class].b + .3) * .5, 1)
|
||||
local classColor = PFUI_CLASS_COLORS[class]
|
||||
_G["ChatFrame" .. i .. "TabText"]:SetTextColor((classColor.r + .3) * .5, (classColor.g + .3) * .5, (classColor.b + .3) * .5, 1)
|
||||
_G["ChatFrame" .. i .. "TabText"]:SetFont(panelfont,panelfont_size, "OUTLINE")
|
||||
|
||||
if _G["ChatFrame" .. i].isDocked or _G["ChatFrame" .. i]:IsVisible() then
|
||||
@@ -766,7 +767,7 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
if class then
|
||||
if class ~= UNKNOWN then
|
||||
color = "|c" .. RAID_CLASS_COLORS[class].colorStr
|
||||
color = "|c" .. PFUI_CLASS_COLORS[class].colorStr
|
||||
match = true
|
||||
end
|
||||
elseif C.chat.text.whosearchunknown == "1" then
|
||||
|
||||
+6
-12
@@ -267,10 +267,8 @@ pfUI:RegisterModule("loot", function ()
|
||||
info = wipe(info)
|
||||
info.text = lclass
|
||||
info.textR, info.textG, info.textB = .7,.7,.7
|
||||
if class and RAID_CLASS_COLORS[class] then
|
||||
info.textR = RAID_CLASS_COLORS[class].r
|
||||
info.textG = RAID_CLASS_COLORS[class].g
|
||||
info.textB = RAID_CLASS_COLORS[class].b
|
||||
if class and PFUI_CLASS_COLORS[class] then
|
||||
info.textR, info.textG, info.textB = PFUI_CLASS_COLORS[class]:GetRGB()
|
||||
end
|
||||
info.textHeight = 12
|
||||
info.hasArrow = 1
|
||||
@@ -290,10 +288,8 @@ pfUI:RegisterModule("loot", function ()
|
||||
info = wipe(info)
|
||||
info.text = candidate
|
||||
info.textR, info.textG, info.textB = .7,.7,.7
|
||||
if UIDROPDOWNMENU_MENU_VALUE and RAID_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE] then
|
||||
info.textR = RAID_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE].r
|
||||
info.textG = RAID_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE].g
|
||||
info.textB = RAID_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE].b
|
||||
if UIDROPDOWNMENU_MENU_VALUE and PFUI_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE] then
|
||||
info.textR, info.textG, info.textB = PFUI_CLASS_COLORS[UIDROPDOWNMENU_MENU_VALUE]:GetRGB()
|
||||
end
|
||||
info.textHeight = 12
|
||||
info.value = name_to_index[candidate]
|
||||
@@ -314,10 +310,8 @@ pfUI:RegisterModule("loot", function ()
|
||||
local unit = GroupInfoByName(candidate,"party")
|
||||
info.text = candidate
|
||||
info.textR, info.textG, info.textB = .7,.7,.7
|
||||
if unit.class and RAID_CLASS_COLORS[unit.class] then
|
||||
info.textR = RAID_CLASS_COLORS[unit.class].r
|
||||
info.textG = RAID_CLASS_COLORS[unit.class].g
|
||||
info.textB = RAID_CLASS_COLORS[unit.class].b
|
||||
if unit.class and PFUI_CLASS_COLORS[unit.class] then
|
||||
info.textR, info.textG, info.textB = PFUI_CLASS_COLORS[unit.class]:GetRGB()
|
||||
end
|
||||
info.textHeight = 12
|
||||
info.value = i
|
||||
|
||||
@@ -86,7 +86,7 @@ pfUI:RegisterModule("mapcolors", function ()
|
||||
|
||||
local function ColorizeName(frame)
|
||||
local _, class = UnitClass(frame.unit)
|
||||
local color = RAID_CLASS_COLORS[class]
|
||||
local color = PFUI_CLASS_COLORS[class]
|
||||
frame.name = frame.name or UnitName(frame.unit)
|
||||
frame.name = '|c'..color.colorStr..frame.name..'|r'
|
||||
end
|
||||
|
||||
@@ -1215,9 +1215,9 @@ end
|
||||
|
||||
if class then
|
||||
if unittype == "ENEMY_PLAYER" and C.nameplates["enemyclassc"] == "1" then
|
||||
r, g, b, a = RAID_CLASS_COLORS[class]:GetRGBA()
|
||||
r, g, b, a = PFUI_CLASS_COLORS[class]:GetRGBA()
|
||||
elseif unittype == "FRIENDLY_PLAYER" and C.nameplates["friendclassc"] == "1" then
|
||||
r, g, b, a = RAID_CLASS_COLORS[class]:GetRGBA()
|
||||
r, g, b, a = PFUI_CLASS_COLORS[class]:GetRGBA()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1239,7 +1239,7 @@ end
|
||||
plate.cache.r, plate.cache.g, plate.cache.b = r, g, b
|
||||
end
|
||||
|
||||
if r + g + b ~= plate.cache.namecolor and unittype == "FRIENDLY_PLAYER" and C.nameplates["friendclassnamec"] == "1" and class and RAID_CLASS_COLORS[class] then
|
||||
if r + g + b ~= plate.cache.namecolor and unittype == "FRIENDLY_PLAYER" and C.nameplates["friendclassnamec"] == "1" and class and PFUI_CLASS_COLORS[class] then
|
||||
plate.name:SetTextColor(r, g, b, a)
|
||||
plate.cache.namecolor = r + g + b
|
||||
end
|
||||
|
||||
+2
-2
@@ -315,7 +315,7 @@ pfUI:RegisterModule("panel", function()
|
||||
GameTooltip:AddLine("|cff555555" .. T["Friends Online"])
|
||||
init = true
|
||||
end
|
||||
local ccolor = RAID_CLASS_COLORS[L["class"][friend_class]] or { 1, 1, 1 }
|
||||
local ccolor = PFUI_CLASS_COLORS[L["class"][friend_class]] or { 1, 1, 1 }
|
||||
local lcolor = GetDifficultyColor(tonumber(friend_level)) or { 1, 1, 1 }
|
||||
local zcolor = friend_area == playerzone and "|cff33ffcc" or "|cffcccccc"
|
||||
GameTooltip:AddDoubleLine(rgbhex(ccolor) .. friend_name .. rgbhex(lcolor) .. " [" .. friend_level .. "]", zcolor .. friend_area)
|
||||
@@ -375,7 +375,7 @@ pfUI:RegisterModule("panel", function()
|
||||
init = true
|
||||
end
|
||||
|
||||
local ccolor = RAID_CLASS_COLORS[L["class"][class]] or { 1, 1, 1 }
|
||||
local ccolor = PFUI_CLASS_COLORS[L["class"][class]] or { 1, 1, 1 }
|
||||
local lcolor = GetDifficultyColor(tonumber(level)) or { 1, 1, 1 }
|
||||
local level = "|cff555555" .. "[" .. rgbhex(lcolor) .. level .. "|cff555555]"
|
||||
local raid = raidparty[name] and "|cff555555[|cff33ffccG|cff555555]|r" or ""
|
||||
|
||||
@@ -19,7 +19,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
|
||||
if name then
|
||||
if class then
|
||||
local color = RAID_CLASS_COLORS[class]
|
||||
local color = PFUI_CLASS_COLORS[class]
|
||||
local classicon = _G["GuildFrameButton"..i].classicon
|
||||
local coords = CLASS_ICON_TCOORDS[class]
|
||||
|
||||
@@ -86,7 +86,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
|
||||
if connected then
|
||||
if not class or class == _G.UNKNOWN then break end
|
||||
local ccolor = RAID_CLASS_COLORS[L["class"][class]] or { 1, 1, 1 }
|
||||
local ccolor = PFUI_CLASS_COLORS[L["class"][class]] or { 1, 1, 1 }
|
||||
local lcolor = GetDifficultyColor(tonumber(level)) or { 1, 1, 1 }
|
||||
|
||||
zone = ( zone == playerzone and "|cffffffff" or "|cffcccccc" ) .. zone .. "|r"
|
||||
@@ -172,7 +172,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
if class then
|
||||
local classicon = _G["WhoFrameButton"..i].classicon
|
||||
local coords = CLASS_ICON_TCOORDS[class]
|
||||
local color = RAID_CLASS_COLORS[class]
|
||||
local color = PFUI_CLASS_COLORS[class]
|
||||
|
||||
-- do we have classicons? (skin enabled?)
|
||||
if classicon then
|
||||
|
||||
@@ -531,9 +531,9 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
|
||||
|
||||
-- replace wim class colors with pfUI ones
|
||||
hooksecurefunc("WIM_InitClassProps", function()
|
||||
for class in pairs(RAID_CLASS_COLORS) do
|
||||
for class in pairs(PFUI_CLASS_COLORS) do
|
||||
local wimclass = _G[format("WIM_LOCALIZED_%s",class)]
|
||||
local colorstr = "|c" .. RAID_CLASS_COLORS[class].colorStr
|
||||
local colorstr = "|c" .. PFUI_CLASS_COLORS[class].colorStr
|
||||
_G.WIM_ClassColors[wimclass] = gsub(colorstr, "^|cff", "")
|
||||
end
|
||||
end)
|
||||
|
||||
+2
-2
@@ -200,7 +200,7 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
|
||||
if name then
|
||||
if UnitIsPlayer(unit) and class then
|
||||
local color = RAID_CLASS_COLORS[class]
|
||||
local color = PFUI_CLASS_COLORS[class]
|
||||
GameTooltipStatusBar:SetStatusBarColor_orig(color:GetRGB())
|
||||
GameTooltip:SetBackdropBorderColor(color:GetRGB())
|
||||
GameTooltipTextLeft1:SetText("|c" .. color.colorStr .. name)
|
||||
@@ -229,7 +229,7 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
local _, targetClass = UnitClass(unit .. "target")
|
||||
local targetReaction = UnitReaction("player",unit .. "target")
|
||||
if UnitIsPlayer(unit .. "target") and targetClass then
|
||||
local color = RAID_CLASS_COLORS[targetClass]
|
||||
local color = PFUI_CLASS_COLORS[targetClass]
|
||||
GameTooltip:AddLine(target, color.r, color.g, color.b)
|
||||
elseif targetReaction then
|
||||
local color = UnitReactionColor[targetReaction]
|
||||
|
||||
Reference in New Issue
Block a user