Было уже на форуме.
PHP код:
local math_ceil, CapDisplay = math.ceil, TextStatusBar_CapDisplayOfNumericValue;
local FrameList = {
["PlayerFrameHealthBar"] = true,
["TargetFrameHealthBar"] = true,
["FocusFrameHealthBar"] = true,
["PlayerFrameManaBar"] = true,
["TargetFrameManaBar"] = true,
["FocusFrameManaBar"] = true,
};
hooksecurefunc("TextStatusBar_UpdateTextString",function(self)
if not FrameList[self:GetName()] then return; end;
local Text = self.TextString;
local Value = self:GetValue();
if Value and Value > 0 and Text then
local _, MaxValue = self:GetMinMaxValues();
local HealthPercent = math_ceil((Value / MaxValue)*100);
Text:SetFormattedText("%s / %s (%u%%)", CapDisplay(Value), CapDisplay(MaxValue), HealthPercent);
end
end)