+ if not frame.raid and not frame.text.status and frame.prev.htext ~= current then
+ frame.prev.htext = current;
+ if frame.boss then
+ if hmax < current or hmax <= 1 then
+ frame.text:SetText("100");
+ if not frame.text:IsShown() then frame.text:Show() end
+ elseif current <= 0 then
+ if frame.text:IsShown() then frame.text:Hide() end
+ else
+ frame.text:SetFormattedText("%.1f", current/hmax*100);
+ if not frame.text:IsShown() then frame.text:Show() end
+ end
+ else
+ if current > 1000000000 then -- 1.0B
+ frame.text:SetFormattedText("%.2fB", current / 1000000000);
+ elseif current > 1000000 then -- 1.0M
+ frame.text:SetFormattedText("%.2fM", current / 1000000);
+ elseif current > 1000 then -- 1.0K
+ frame.text:SetFormattedText("%.1fK", current / 1000);
+ end
+ if not frame.text:IsShown() then frame.text:Show() end
+ end
+ end