- 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

@ -245,7 +245,7 @@ end
-- OnUpdate handler
function IceCastBar.prototype:OnUpdate()
function IceCastBar.prototype:MyOnUpdate()
-- safety catch
if (self.action == IceCastBar.Actions.None) then
IceHUD:Debug("Stopping action ", self.action)
@ -370,7 +370,7 @@ function IceCastBar.prototype:StartBar(action, message)
end
self:Show(true)
self.frame:SetScript("OnUpdate", function() self:OnUpdate() end)
self:ConditionalSetupUpdate()
end
@ -380,16 +380,6 @@ function IceCastBar.prototype:StopBar()
self.actionDuration = nil
self:Show(false)
self.frame:SetScript("OnUpdate", nil)
end
-- make sure that our custom OnUpdate is restored whenever a Redraw happens
function IceCastBar.prototype:Redraw()
IceCastBar.super.prototype.Redraw(self)
if self.action ~= IceCastBar.Actions.None then
self.frame:SetScript("OnUpdate", function() self:OnUpdate() end)
end
end
function IceCastBar.prototype:GetShortRank(rank)