You need to either remove the function enclosures or call them. I suggest removing them since the functions hooked already exist on load.
Lua Code:
-- Включение цвета классов на полосах здоровья
hooksecurefunc("HealthBar_OnValueChanged",function(self)
local unit=self.unit;
if UnitIsPlayer(unit) and UnitIsConnected(unit) then
local _,class=UnitClass(unit);
if class then
self:SetStatusBarColor(ColorMixin.GetRGB(CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]));
end
end
end);
-- Изменяет бэкграунд на фреймах таргета и фокуса
hooksecurefunc("TargetFrame_CheckFaction",function(self)
self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.01);
end);
PS: I cleaned up the code some. Hooking
UnitFrameHealthBar_Update() was unnecessary as it ended up triggering
HealthBar_OnValueChanged() anyway. Also while
RAID_CLASS_COLORS inherits
ColorMixin,
CUSTOM_CLASS_COLORS isn't so clearly defined as it's not a Blizzard variable. This is why
:GetRGB() is called from
ColorMixin instead of the color tables. Note '.' was used instead of ':' so the color table could be given to the function as a reference instead of it trying to take
ColorMixin as
self.