- fixed a few edge cases where custom cooldown bars would not display when the spell was ready and the bar was set to "when ready" mode. this could happen if the player ran out of mana then gained enough back to cast the spell or for ranged spells where the target moved in and out of range

This commit is contained in:
Parnic
2010-07-26 23:50:46 +00:00
parent 863e150a34
commit 374ff3d324

View File

@ -408,14 +408,16 @@ 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 -- 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 -- 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. -- 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 and (self.moduleSettings.displayMode == "When ready")--[[ and (IsUsableSpell(self.moduleSettings.cooldownToTrack) == 1)]]) then
if SpellHasRange(self.moduleSettings.cooldownToTrack) then -- Parnic: there are too many edge cases for "when ready" cooldowns that cause the bar to not appear when it should
if IsSpellInRange(self.moduleSettings.cooldownToTrack, "target") then -- so, i'm forcing updates to always run for any bar that's set to only show "when ready"
enable_update = true -- if SpellHasRange(self.moduleSettings.cooldownToTrack) then
end -- if IsSpellInRange(self.moduleSettings.cooldownToTrack, "target") then
else -- enable_update = true
-- end
-- else
enable_update = true enable_update = true
end -- end
end end
if enable_update then if enable_update then