Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

pet status text format fixed but can't open PR #4

Description

@Hallonq

Hey. gr8 simple addon.

I noticed it has not been updated in a while and read the author has quit wow.

I fixed the pet status text format and tried opening a PR but insufficient permission so I'll post the lua code here.

Enjoy hunters and warlocks.

`local Name, AddOn = ...;
local Title = select(2,GetAddOnInfo(Name)):gsub("%s*v?[%d%.]+$","");

local FontType = "Fonts\FRIZQT__.ttf"; -- choose font here!

local function ApplyFonts()
PlayerFrameHealthBar.TextString:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
PlayerFrameHealthBar.LeftText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
PlayerFrameHealthBar.RightText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")

PlayerFrameManaBar.TextString:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
PlayerFrameManaBar.LeftText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
PlayerFrameManaBar.RightText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")

PetFrameHealthBar.TextString:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")
PetFrameHealthBar.LeftText:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")
PetFrameHealthBar.RightText:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")

PetFrameManaBar.TextString:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")
PetFrameManaBar.LeftText:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")
PetFrameManaBar.RightText:SetFont(FontType, FormatFix_FontSize - 2, "OUTLINE")

TargetFrameHealthBar.TextString:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
TargetFrameHealthBar.LeftText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
TargetFrameHealthBar.RightText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")

TargetFrameManaBar.TextString:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
TargetFrameManaBar.LeftText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")
TargetFrameManaBar.RightText:SetFont(FontType, FormatFix_FontSize, "OUTLINE")

end

local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, ...) self[event](self, ...) end)
function f:ADDON_LOADED()
if FormatFix_UsePercent == nil then FormatFix_UsePercent = false; end
if FormatFix_FormatPet == nil then FormatFix_FormatPet = true; end
if FormatFix_FontSize == nil then FormatFix_FontSize = 12; end

ApplyFonts();

end

local BarFormatFuncs={
[PlayerFrameHealthBar]=function(self,textstring,val,min,max)
textstring:SetText(AbbreviateLargeNumbers(val));
end;
[TargetFrameHealthBar]=function(self,textstring,val,min,max)
if not FormatFix_UsePercent then textstring:SetText(AbbreviateLargeNumbers(val));
elseif max==100 then textstring:SetText(AbbreviateLargeNumbers(val).."%");
else textstring:SetFormattedText("%s || %.0f%%",AbbreviateLargeNumbers(val),100*val/max); end
end;
[PetFrameHealthBar]=function(self,textstring,val,min,max)
textstring:SetText(AbbreviateLargeNumbers(val));
end;
[PetFrameManaBar]=function(self,textstring,val,min,max)
textstring:SetText(AbbreviateLargeNumbers(val));
textstring:SetPoint("CENTER", PetFrame, "TOPLEFT", 82, -35);
end;
}

BarFormatFuncs[PlayerFrameManaBar]=BarFormatFuncs[PlayerFrameHealthBar];
BarFormatFuncs[TargetFrameManaBar]=BarFormatFuncs[PlayerFrameHealthBar];

hooksecurefunc("TextStatusBar_UpdateTextStringWithValues",function(self,...)
if BarFormatFuncs[self] then
if GetCVar("statusTextDisplay") == "NUMERIC" then
BarFormatFuncsself;
(...):Show();
end
end
end);
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions