Hello everyone.
Iv been using a Old script to change HP color to class color.
I have also changed texturens on the default HP and mana bars to a flat texture using the interace / targetframe technique.
Now a issue I have is that the code I’m using removes the target frame background completely and it’s not what I want but atm it looks best as I cant figure out how to change the background on the target unit Name area to be flat just like the other textures
So here is what I am looking for.
A script or other option to keep hp bars set to class color , I want my bars to be flat but I want the name background to be visual but changed to a flat texture not the round one blizzard uses.
Anyone know how to do this?
This is the script I am using loaded in my own addon.
local function colour(statusbar, unit)
local _, class, c
if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
_, class = UnitClass(unit)
c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
statusbar:SetStatusBarColor(c.r, c.g, c.b)
PlayerFrameHealthBar:SetStatusBarColor(0,1,0)
end
end
hooksecurefunc(“UnitFrameHealthBar_Update”, colour)
hooksecurefunc(“HealthBar_OnValueChanged”, function(self)
colour(self, self.unit)
end)
Thanks in advanced