performance optimizations:

- only run the OnUpdate code for the player mana bar when the player's power is not full
- never run the every-frame OnUpdate for TargetMana or DruidMana bars since we don't need quite that level of granularity
This commit is contained in:
Parnic
2008-10-29 04:01:11 +00:00
parent eaa7b73b85
commit 2814ba0d20
4 changed files with 45 additions and 54 deletions

View File

@ -35,16 +35,7 @@ function DruidMana.prototype:Enable(core)
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM", "Update")
self:RegisterEvent("UNIT_MAXMANA", "Update")
if IceHUD.WowVer >= 30000 then
if GetCVarBool("predictedPower") and self.frame then
self.frame:SetScript("OnUpdate", function() self:Update() end)
else
self:RegisterEvent("UNIT_MANA", "Update")
end
else
self:RegisterEvent("UNIT_MANA", "Update")
end
self:RegisterEvent("UNIT_MANA", "Update")
end