From 0f62e059a61cc7d956cfa193807605ad8bc6b867 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Wed, 7 Feb 2024 11:20:55 -0300 Subject: [PATCH] Fixed player color not showing when not using class colors --- classes/class_damage.lua | 10 +++++++++- frames/window_main.lua | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/classes/class_damage.lua b/classes/class_damage.lua index ac6fd3fba..df23a79e4 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -3249,7 +3249,12 @@ end function Details:SetBarColors(bar, instance, r, g, b, a) --[[exported]] --~colors a = a or 1 - if (instance.row_info.texture_class_colors) then + local bUseClassColor = instance.row_info.texture_class_colors + + if (self.customColor) then + bar.textura:SetVertexColor(r, g, b, a) + + elseif (bUseClassColor) then if (self.classe == "UNGROUPPLAYER") then if (self.spec) then local specId, specName, specDescription, specIcon, specRole, specClass = DetailsFramework.GetSpecializationInfoByID(self.spec) @@ -3259,6 +3264,9 @@ function Details:SetBarColors(bar, instance, r, g, b, a) --[[exported]] --~color end end bar.textura:SetVertexColor(r, g, b, a) + else + r, g, b = unpack(instance.row_info.fixed_texture_color) + bar.textura:SetVertexColor(r, g, b, a) end if (instance.row_info.texture_background_class_color) then diff --git a/frames/window_main.lua b/frames/window_main.lua index b93948610..63d8e3325 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -4762,9 +4762,9 @@ function Details:InstanceRefreshRows(instance) local textR_outline_small_color = self.row_info.textR_outline_small_color --texture color values - local texture_class_color = self.row_info.texture_class_colors + local bUseClassColor = self.row_info.texture_class_colors local texture_r, texture_g, texture_b - if (not texture_class_color) then + if (not bUseClassColor) then texture_r, texture_g, texture_b = unpack(self.row_info.fixed_texture_color) end @@ -4963,7 +4963,7 @@ function Details:InstanceRefreshRows(instance) end --texture class color: if true color changes on the fly through class refresh - if (not texture_class_color) then + if (not bUseClassColor) then row.textura:SetVertexColor(texture_r, texture_g, texture_b, alpha) else --automatically color the bar by the actor class