mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- removed a few old CancelScheduledEvent calls on bars that weren't actually scheduling any repeating timers any more and added a few CancelTimers to modules that weren't previously canceling their scheduled timers
- converted CancelScheduledEvent to CancelTimer for modules that are still scheduling repeating timers...not sure why CancelScheduledEvent didn't throw any errors (since i don't see how it exists) but whatever - removed a bunch of "function() self:Thing() end" closures in ScheduleRepeatingTimer calls that didn't need to be there
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
local AceOO = AceLibrary("AceOO-2.0")
|
||||
|
||||
local GlobalCoolDown = AceOO.Class(IceBarElement)
|
||||
GlobalCoolDown.prototype.scheduledEvent = nil
|
||||
|
||||
-- Constructor --
|
||||
function GlobalCoolDown.prototype:init()
|
||||
@ -26,7 +27,7 @@ function GlobalCoolDown.prototype:Enable(core)
|
||||
|
||||
self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN", "CooldownStateChanged")
|
||||
|
||||
self:ScheduleRepeatingTimer(function() self:UpdateGlobalCoolDown() end, 0.05)
|
||||
self.scheduledEvent = self:ScheduleRepeatingTimer("UpdateGlobalCoolDown", 0.05)
|
||||
|
||||
self:Show(false)
|
||||
end
|
||||
@ -34,7 +35,7 @@ end
|
||||
function GlobalCoolDown.prototype:Disable(core)
|
||||
GlobalCoolDown.super.prototype.Disable(self, core)
|
||||
|
||||
self:CancelScheduledEvent(self.elementName)
|
||||
self:CancelTimer(self.scheduledEvent, true)
|
||||
end
|
||||
|
||||
function GlobalCoolDown.prototype:GetSpellId()
|
||||
|
Reference in New Issue
Block a user