- removed most of the rest of the garbage that was being generated during combat or when changing targets

- reduced cpu usage by 33%-50% across the board (and more in some cases) by changing how updates are registered and how often they run. now the 'update period' slider actually matters. it defaults to 0.033 meaning that frames update about 30 times a second instead of every frame
- fixed the "always" display mode for cooldown bars to respect alpha settings (ooc/with target/in combat/etc.)
This commit is contained in:
Parnic
2010-10-25 02:05:58 +00:00
parent d0be3b42a7
commit e003fab854
20 changed files with 324 additions and 187 deletions

View File

@ -58,8 +58,6 @@ function EclipseBar.prototype:Enable(core)
self:RegisterEvent("UNIT_AURA", "UpdateEclipseBuffs")
self:RegisterEvent("ECLIPSE_DIRECTION_CHANGE", "UpdateEclipseDirection")
self.frame:SetScript("OnUpdate", function() self:Update() end)
self:UpdateEclipseDirection(nil, GetEclipseDirection() == "sun", GetEclipseDirection() == "none")
self:UpdateEclipseBuffs()
self:UpdateShown()
@ -97,7 +95,7 @@ function EclipseBar.prototype:CreateFrame()
self:UpdateAlpha()
end
function EclipseBar.prototype:RegisterOnUpdate()
function EclipseBar.prototype:ShouldRegisterOnUpdate()
return false
end
@ -146,7 +144,7 @@ function EclipseBar.prototype:CreateSolarBar()
end
function EclipseBar.prototype:UpdateShown()
local form = GetShapeshiftFormID();
local form = GetShapeshiftFormID()
if form == MOONKIN_FORM or not form then
if GetPrimaryTalentTree() == 1 then
@ -206,8 +204,8 @@ function EclipseBar.prototype:UpdateEclipsePower()
self:PositionMarker(1, pos)
end
function EclipseBar.prototype:Update()
EclipseBar.super.prototype.Update(self)
function EclipseBar.prototype:MyOnUpdate()
self:Update()
self:UpdateEclipsePower()
self:UpdateBar(0.5, self.barUpdateColor, 1)