The problem is it's doing it for the power bar text also. I was trying to get the color to show Blue, Yellow, Red instead of Green, Yellow, Red for Mana.
But I also would like the color to start with Orange if the target has rage or whatever color depending on what kind of power the Target has.
Since I was thinking about making this a add-on for others to use would it be possible to have the code work for other players depending on what their class is?
Right now the code just changes the status text to Green, Yellow, Red. Which is fine by it's self for the health text but not the power text.
Can someone please help?
hooksecurefunc("TextStatusBar_UpdateTextStringWithValues",function(statusFrame, _, value, valueMin, valueMax) local leftText = statusFrame.LeftText local rightText = statusFrame.RightText if leftText and rightText then local percent = value / valueMax local r,g,b = 1,0.82,0 -- yellow if percent < 0.335 then r,g,b = 1,0,0 -- red elseif percent > 0.665 then r,g,b = 0,1,0 -- green end leftText:SetTextColor(r,g,b) rightText:SetTextColor(r,g,b) end end)