mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 02:16:02 +00:00
Version 6.1.1 - Chat & Nameplate Level Fixes
Bugfixes: - Fixed targeting high-level players overwriting known level with -1 - Chat now shows "??" instead of -1 for unknown levels - Nameplates now use stored level from database after reload - Nameplate level color now uses difficulty color when loaded from DB Config Changes: - Chat player level display now disabled by default
This commit is contained in:
+5
-1
@@ -797,11 +797,15 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
local real, _ = strsplit(":", name)
|
||||
local level = GetPlayerLevel(real)
|
||||
|
||||
if level then
|
||||
if level and level > 0 then
|
||||
local levelcolor = rgbhex(GetDifficultyColor(level))
|
||||
-- Add level after the player name, before the closing bracket
|
||||
text = string.gsub(text, "(|Hplayer:" .. name .. "|h.-|h|r)" .. right,
|
||||
"%1 " .. levelcolor .. level .. "|r" .. right)
|
||||
elseif level and level <= 0 then
|
||||
-- Show ?? for unknown levels (e.g. -1 from UnitLevel)
|
||||
text = string.gsub(text, "(|Hplayer:" .. name .. "|h.-|h|r)" .. right,
|
||||
"%1 |cffff0000??|r" .. right)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user