mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40: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:
@ -8,6 +8,7 @@ TargetOfTarget.prototype.buffSize = nil
|
||||
TargetOfTarget.prototype.height = nil
|
||||
TargetOfTarget.prototype.unit = nil
|
||||
TargetOfTarget.prototype.hadTarget = nil
|
||||
TargetOfTarget.prototype.scheduledEvent = nil
|
||||
|
||||
|
||||
-- Constructor --
|
||||
@ -210,7 +211,7 @@ end
|
||||
function TargetOfTarget.prototype:Enable(core)
|
||||
TargetOfTarget.super.prototype.Enable(self, core)
|
||||
|
||||
self:ScheduleRepeatingTimer(function() self:Update() end, 0.2)
|
||||
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", 0.2)
|
||||
RegisterUnitWatch(self.frame)
|
||||
|
||||
self:Update()
|
||||
@ -220,7 +221,7 @@ end
|
||||
function TargetOfTarget.prototype:Disable(core)
|
||||
TargetOfTarget.super.prototype.Disable(self, core)
|
||||
|
||||
self:CancelScheduledEvent(self.elementName)
|
||||
self:CancelTimer(self.scheduledEvent, true)
|
||||
|
||||
UnregisterUnitWatch(self.frame)
|
||||
end
|
||||
|
Reference in New Issue
Block a user