mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- fixed custom cooldown bars not working quite right with the 'When ready' display mode. the update subscription query was returning a false positive because a block of code in one of the CD bar's parent classes had already subscribed for updates, but the CD bar wanted to use its own update function.
This commit is contained in:
@ -522,7 +522,7 @@ function IceCustomCDBar.prototype:EnableUpdates(enable_update)
|
||||
-- There is a hole in the logic here for spells that can be cast on any friendly target. When
|
||||
-- the correct UI option is selected they will cast on self when no target is selected. Deal
|
||||
-- with that later if it turns out to be a problem.
|
||||
if (not enable and (self.moduleSettings.displayMode == "When ready")--[[ and (IsUsableSpell(self.moduleSettings.cooldownToTrack) == 1)]]) then
|
||||
if (not enable_update and (self.moduleSettings.displayMode == "When ready")--[[ and (IsUsableSpell(self.moduleSettings.cooldownToTrack) == 1)]]) then
|
||||
-- Parnic: there are too many edge cases for "when ready" cooldowns that cause the bar to not appear when it should
|
||||
-- so, i'm forcing updates to always run for any bar that's set to only show "when ready"
|
||||
-- if SpellHasRange(self.moduleSettings.cooldownToTrack) then
|
||||
@ -535,11 +535,11 @@ function IceCustomCDBar.prototype:EnableUpdates(enable_update)
|
||||
end
|
||||
|
||||
if enable_update then
|
||||
if not IceHUD.IceCore:IsUpdateSubscribed(self) then
|
||||
if not self.CustomUpdateFunc then
|
||||
self.CustomUpdateFunc = function() self:UpdateCustomBar(true) end
|
||||
end
|
||||
if not self.CustomUpdateFunc then
|
||||
self.CustomUpdateFunc = function() self:UpdateCustomBar(true) end
|
||||
end
|
||||
|
||||
if not IceHUD.IceCore:IsUpdateSubscribed(self, self.CustomUpdateFunc) then
|
||||
IceHUD.IceCore:RequestUpdates(self, self.CustomUpdateFunc)
|
||||
end
|
||||
else
|
||||
|
Reference in New Issue
Block a user