diff --git a/CHANGELOG.md b/CHANGELOG.md index 8223aa1..8a6477e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### Version 7.0.3.3 - Fixed an error when opening the Mythic Dungeons window +- Fixed enemy NPC nameplates using the warrior class color ### Version 7.0.3.2 diff --git a/ClassColorsBlizz.lua b/ClassColorsBlizz.lua index c3424ce..66b2aa7 100644 --- a/ClassColorsBlizz.lua +++ b/ClassColorsBlizz.lua @@ -95,20 +95,22 @@ end -- CompactUnitFrame.lua do - local UnitClass, UnitIsConnected = UnitClass, UnitIsConnected + local UnitClass, UnitIsConnected, UnitIsPlayer = UnitClass, UnitIsConnected, UnitIsPlayer hooksecurefunc("CompactUnitFrame_UpdateHealthColor", function(frame) - if frame.optionTable.useClassColors and UnitIsConnected(frame.unit) then + if UnitIsConnected(frame.unit) and UnitIsPlayer(frame.unit) and frame.optionTable.useClassColors then local _, class = UnitClass(frame.unit) - if class then - local color = CUSTOM_CLASS_COLORS[class] - if color then - frame.healthBar:SetStatusBarColor(color.r, color.g, color.b) + local color = CUSTOM_CLASS_COLORS[class] + if color then + frame.healthBar:SetStatusBarColor(color.r, color.g, color.b) + if frame.optionTable.colorHealthWithExtendedColors then + frame.selectionHighlight:SetStatusBarColor(color.r, color.g, color.b) end end end end) end + ------------------------------------------------------------------------ -- FriendsFrame.lua