mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added code to buff/debuff watchers and cooldown watchers to prevent them from sometimes getting stuck (not updating/animating)
This commit is contained in:
@ -848,7 +848,11 @@ end
|
|||||||
|
|
||||||
function IceCore.prototype:RequestUpdates(module, func)
|
function IceCore.prototype:RequestUpdates(module, func)
|
||||||
if self.updatees[module] ~= func then
|
if self.updatees[module] ~= func then
|
||||||
self.updatees[module] = func
|
-- Parnic: this prevents modules who are handling their own updates (as opposed to relying on IceBarElement)
|
||||||
|
-- from having their update request yanked out from under them.
|
||||||
|
if func ~= nil or not module.handlesOwnUpdates then
|
||||||
|
self.updatees[module] = func
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local count = 0
|
local count = 0
|
||||||
|
@ -72,9 +72,11 @@ function IceCustomBar.prototype:ConditionalSubscribe()
|
|||||||
self.CustomBarUpdateFunc = function() self:UpdateCustomBar() end
|
self.CustomBarUpdateFunc = function() self:UpdateCustomBar() end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.handlesOwnUpdates = true
|
||||||
IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
|
IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
self.handlesOwnUpdates = false
|
||||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -700,6 +702,7 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
|
|||||||
self.UpdateCustomBarFunc = function() self:UpdateCustomBar(self.unit, true) end
|
self.UpdateCustomBarFunc = function() self:UpdateCustomBar(self.unit, true) end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.handlesOwnUpdates = true
|
||||||
IceHUD.IceCore:RequestUpdates(self, self.UpdateCustomBarFunc)
|
IceHUD.IceCore:RequestUpdates(self, self.UpdateCustomBarFunc)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -718,6 +721,7 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
|
|||||||
self:UpdateBar(0, "undef")
|
self:UpdateBar(0, "undef")
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
if not self:ShouldAlwaysSubscribe() then
|
if not self:ShouldAlwaysSubscribe() then
|
||||||
|
self.handlesOwnUpdates = false
|
||||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -521,6 +521,8 @@ function IceCustomCDBar.prototype:EnableUpdates(enable_update)
|
|||||||
-- end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.handlesOwnUpdates = enable_update
|
||||||
|
|
||||||
if enable_update then
|
if enable_update then
|
||||||
if not self.CustomUpdateFunc then
|
if not self.CustomUpdateFunc then
|
||||||
self.CustomUpdateFunc = function() self:UpdateCustomBar(true) end
|
self.CustomUpdateFunc = function() self:UpdateCustomBar(true) end
|
||||||
|
Reference in New Issue
Block a user