Simple Nameplate Addon help needed - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-07-20, 11:35 AM   #1
A Murloc Raider
Join Date: Nov 2019
Posts: 5
Simple Nameplate Addon help needed

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


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

It works great for BfA, but ion Shadowlands, it doesnt, can anyone help me out ?

  Reply With Quote

WoWInterface » PTR » PTR General Discussion » Simple Nameplate Addon help needed

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off