mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-14 17:20:50 +00:00
chat: fix playername colors for tbc
This commit is contained in:
+5
-3
@@ -672,9 +672,11 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
|||||||
if C.chat.text.classcolor == "1" then
|
if C.chat.text.classcolor == "1" then
|
||||||
|
|
||||||
for name in gfind(text, "|Hplayer:(.-)|h") do
|
for name in gfind(text, "|Hplayer:(.-)|h") do
|
||||||
|
local real, _ = strsplit(":", name)
|
||||||
local color = unknowncolorhex
|
local color = unknowncolorhex
|
||||||
local match = false
|
local match = false
|
||||||
local class = GetUnitData(name)
|
local class = GetUnitData(real)
|
||||||
|
|
||||||
if class then
|
if class then
|
||||||
if class ~= UNKNOWN then
|
if class ~= UNKNOWN then
|
||||||
color = rgbhex(RAID_CLASS_COLORS[class])
|
color = rgbhex(RAID_CLASS_COLORS[class])
|
||||||
@@ -683,8 +685,8 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if C.chat.text.tintunknown == "1" or match then
|
if C.chat.text.tintunknown == "1" or match then
|
||||||
text = string.gsub(text, "|Hplayer:"..name.."|h%["..name.."%]|h(.-:-)",
|
text = string.gsub(text, "|Hplayer:"..name.."|h%["..real.."%]|h(.-:-)",
|
||||||
left..color.."|Hplayer:"..name.."|h" .. name .. "|h|r"..right.."%1")
|
left..color.."|Hplayer:"..name.."|h" .. color .. real .. "|h|r"..right.."%1")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user