Originally Posted by Meloeth
The health seems to be updating just as on live by default. I have not seen such a option and I can't find any such option when looking for it either... where is it?
|
I have no idea if its in the actual interface options, but here is the relevant code taken from frameXML. It seems the cVar is called "predictedHealth"

function UnitFrameHealthBar_Initialize (unit, statusbar, statustext, frequentUpdates)
if ( not statusbar ) then
return;
end
statusbar.unit = unit;
SetTextStatusBarText(statusbar, statustext);
if ( GetCVarBool("predictedHealth") and frequentUpdates ) then
statusbar:SetScript("OnUpdate", UnitFrameHealthBar_OnUpdate);
else
statusbar:RegisterEvent("UNIT_HEALTH");
end
statusbar:RegisterEvent("UNIT_MAXHEALTH");
statusbar:SetScript("OnEvent", UnitFrameHealthBar_OnEvent);
-- Setup newbie tooltip
if ( statusbar and (statusbar:GetParent() == PlayerFrame) ) then
statusbar.tooltipTitle = HEALTH;
statusbar.tooltipText = NEWBIE_TOOLTIP_HEALTHBAR;
else
statusbar.tooltipTitle = nil;
statusbar.tooltipText = nil;
end
end
function UnitFrameHealthBar_OnEvent(self, event, ...)
if ( event == "CVAR_UPDATE" ) then
TextStatusBar_OnEvent(self, event, ...);
else
UnitFrameHealthBar_Update(self, ...);
end
end
function UnitFrameHealthBar_OnUpdate(self)
if ( not self.disconnected ) then
local currValue = UnitHealth(self.unit);
if ( currValue ~= self.currValue ) then
self:SetValue(currValue);
self.currValue = currValue;
TextStatusBar_UpdateTextString(self);
end
end
end