Hi there, i need some advice/help about an addon that i use.
Someone here in the forums did the code for me
local NamePlateHealthText={};
hooksecurefunc(NamePlateDriverFrame,"OnNamePlateCreated",function(self,base)-- Hook Nameplate creation
local unitframe=base.UnitFrame;
local health=unitframe.healthBar:CreateFontString(nil,"OVERLAY");
health:SetFont("Fonts\\FRIZQT__.TTF",12,"OUTLINE");-- Fonts are easier to read when made from scratch rather than resizing an inherited one
health:SetPoint("CENTER");
health:SetTextColor(1,1,1);
NamePlateHealthText[unitframe]=health;
end);
hooksecurefunc("CompactUnitFrame_UpdateHealth",function(self)-- This is a shared function with other UnitFrames
if NamePlateHealthText[self] then
local cur,max=UnitHealth(self.displayedUnit),UnitHealthMax(self.displayedUnit);
NamePlateHealthText[self]:SetFormattedText("%d - %.0f%%",cur,100*cur/max); end
end);
It works great for BfA, but ion Shadowlands, it doesnt, can anyone help me out ?