mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
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:
@ -503,7 +503,7 @@ function IceBarElement.prototype:CreateFrame()
|
||||
-- never register the OnUpdate for the mirror bar since it's handled internally
|
||||
-- in addition, do not register OnUpdate if predictedPower is set and this is the player mana or target mana bar
|
||||
if not string.find(self.elementName, "MirrorBar")
|
||||
and ((IceHUD.WowVer < 30000 or not GetCVarBool("predictedPower")) or (not string.find(self.elementName, "PlayerMana") and not string.find(self.elementName, "TargetMana"))) then
|
||||
and ((IceHUD.WowVer < 30000 or not GetCVarBool("predictedPower")) or (not string.find(self.elementName, "PlayerMana"))) then
|
||||
self.frame:SetScript("OnUpdate", function() self:MyOnUpdate() end)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user