mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 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:
@ -33,6 +33,8 @@ function SliceAndDice.prototype:init()
|
||||
|
||||
self:SetDefaultColor("SliceAndDice", 0.75, 1, 0.2)
|
||||
self:SetDefaultColor("SliceAndDicePotential", 1, 1, 1)
|
||||
|
||||
self.bTreatEmptyAsFull = true
|
||||
end
|
||||
|
||||
-- 'Public' methods -----------------------------------------------------------
|
||||
@ -208,6 +210,13 @@ function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
|
||||
return nil, nil
|
||||
end
|
||||
|
||||
function SliceAndDice.prototype:MyOnUpdate()
|
||||
SliceAndDice.super.prototype.MyOnUpdate(self)
|
||||
if self.bUpdateSnd then
|
||||
self:UpdateSliceAndDice(nil, self.unit, true)
|
||||
end
|
||||
end
|
||||
|
||||
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
|
||||
if unit and unit ~= self.unit then
|
||||
return
|
||||
@ -228,7 +237,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
|
||||
|
||||
if sndEndTime and sndEndTime >= now then
|
||||
if not fromUpdate then
|
||||
self.frame:SetScript("OnUpdate", function() self:UpdateSliceAndDice(nil, self.unit, true) end)
|
||||
self.bUpdateSnd = true
|
||||
end
|
||||
|
||||
self:Show(true)
|
||||
@ -244,7 +253,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
|
||||
|
||||
if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints() == 0)) or not UnitExists("target") then
|
||||
if self.bIsVisible then
|
||||
self.frame:SetScript("OnUpdate", nil)
|
||||
self.bUpdateSnd = nil
|
||||
end
|
||||
|
||||
if not self.moduleSettings.alwaysFullAlpha then
|
||||
|
Reference in New Issue
Block a user