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:
@ -63,8 +63,6 @@ end
|
|||||||
|
|
||||||
function IceCustomBar.prototype:Disable(core)
|
function IceCustomBar.prototype:Disable(core)
|
||||||
IceCustomBar.super.prototype.Disable(self, core)
|
IceCustomBar.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -58,8 +58,6 @@ end
|
|||||||
|
|
||||||
function IceCustomCDBar.prototype:Disable(core)
|
function IceCustomCDBar.prototype:Disable(core)
|
||||||
IceCustomCDBar.super.prototype.Disable(self, core)
|
IceCustomCDBar.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
IceCustomHealth = AceOO.Class(IceTargetHealth)
|
IceCustomHealth = AceOO.Class(IceTargetHealth)
|
||||||
|
IceCustomHealth.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function IceCustomHealth.prototype:init()
|
function IceCustomHealth.prototype:init()
|
||||||
@ -103,13 +104,13 @@ function IceCustomHealth.prototype:Enable(core)
|
|||||||
self:SetUnit(self.moduleSettings.unitToTrack)
|
self:SetUnit(self.moduleSettings.unitToTrack)
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:Update() end, IceHUD.IceCore:UpdatePeriod())
|
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", IceHUD.IceCore:UpdatePeriod())
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomHealth.prototype:Disable(core)
|
function IceCustomHealth.prototype:Disable(core)
|
||||||
IceCustomHealth.super.prototype.Disable(self, core)
|
IceCustomHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomHealth.prototype:Update(unit)
|
function IceCustomHealth.prototype:Update(unit)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
IceCustomMana = AceOO.Class(IceTargetMana)
|
IceCustomMana = AceOO.Class(IceTargetMana)
|
||||||
|
IceCustomMana.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function IceCustomMana.prototype:init()
|
function IceCustomMana.prototype:init()
|
||||||
@ -104,13 +105,13 @@ function IceCustomMana.prototype:Enable(core)
|
|||||||
|
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:Update() end, IceHUD.IceCore:UpdatePeriod())
|
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", IceHUD.IceCore:UpdatePeriod())
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomMana.prototype:Disable(core)
|
function IceCustomMana.prototype:Disable(core)
|
||||||
IceCustomMana.super.prototype.Disable(self, core)
|
IceCustomMana.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomMana.prototype:SetUnit(unit)
|
function IceCustomMana.prototype:SetUnit(unit)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local GlobalCoolDown = AceOO.Class(IceBarElement)
|
local GlobalCoolDown = AceOO.Class(IceBarElement)
|
||||||
|
GlobalCoolDown.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function GlobalCoolDown.prototype:init()
|
function GlobalCoolDown.prototype:init()
|
||||||
@ -26,7 +27,7 @@ function GlobalCoolDown.prototype:Enable(core)
|
|||||||
|
|
||||||
self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN", "CooldownStateChanged")
|
self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN", "CooldownStateChanged")
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:UpdateGlobalCoolDown() end, 0.05)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("UpdateGlobalCoolDown", 0.05)
|
||||||
|
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
end
|
end
|
||||||
@ -34,7 +35,7 @@ end
|
|||||||
function GlobalCoolDown.prototype:Disable(core)
|
function GlobalCoolDown.prototype:Disable(core)
|
||||||
GlobalCoolDown.super.prototype.Disable(self, core)
|
GlobalCoolDown.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function GlobalCoolDown.prototype:GetSpellId()
|
function GlobalCoolDown.prototype:GetSpellId()
|
||||||
|
@ -44,8 +44,6 @@ end
|
|||||||
|
|
||||||
function HungerForBlood.prototype:Disable(core)
|
function HungerForBlood.prototype:Disable(core)
|
||||||
HungerForBlood.super.prototype.Disable(self, core)
|
HungerForBlood.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -7,6 +7,7 @@ PlayerInfo.prototype.mainHandEnchantTimeSet = 0
|
|||||||
PlayerInfo.prototype.mainHandEnchantEndTime = 0
|
PlayerInfo.prototype.mainHandEnchantEndTime = 0
|
||||||
PlayerInfo.prototype.offHandEnchantTimeSet = 0
|
PlayerInfo.prototype.offHandEnchantTimeSet = 0
|
||||||
PlayerInfo.prototype.offHandEnchantEndTime = 0
|
PlayerInfo.prototype.offHandEnchantEndTime = 0
|
||||||
|
PlayerInfo.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function PlayerInfo.prototype:init()
|
function PlayerInfo.prototype:init()
|
||||||
@ -102,7 +103,13 @@ function PlayerInfo.prototype:Enable(core)
|
|||||||
self:HideBlizz()
|
self:HideBlizz()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:RepeatingUpdateBuffs() end, 1)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("RepeatingUpdateBuffs", 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function PlayerInfo.prototype:Disable(core)
|
||||||
|
PlayerInfo.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerInfo.prototype:ShowBlizz()
|
function PlayerInfo.prototype:ShowBlizz()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local RangeCheck = AceOO.Class(IceElement)
|
local RangeCheck = AceOO.Class(IceElement)
|
||||||
|
RangeCheck.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
local LibRange = nil
|
local LibRange = nil
|
||||||
local DogTag = nil
|
local DogTag = nil
|
||||||
@ -23,7 +24,7 @@ function RangeCheck.prototype:Enable(core)
|
|||||||
DogTag = AceLibrary("LibDogTag-3.0")
|
DogTag = AceLibrary("LibDogTag-3.0")
|
||||||
self:RegisterFontStrings()
|
self:RegisterFontStrings()
|
||||||
else
|
else
|
||||||
self:ScheduleRepeatingTimer(function() self:UpdateRange() end, 0.1)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("UpdateRange", 0.1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ function RangeCheck.prototype:Disable(core)
|
|||||||
if DogTag then
|
if DogTag then
|
||||||
self:UnregisterFontStrings()
|
self:UnregisterFontStrings()
|
||||||
else
|
else
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ end
|
|||||||
|
|
||||||
function SliceAndDice.prototype:Disable(core)
|
function SliceAndDice.prototype:Disable(core)
|
||||||
SliceAndDice.super.prototype.Disable(self, core)
|
SliceAndDice.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -236,15 +236,11 @@ function TargetCC.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_AURA", "UpdateTargetDebuffs")
|
self:RegisterEvent("UNIT_AURA", "UpdateTargetDebuffs")
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateTargetDebuffs")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateTargetDebuffs")
|
||||||
|
|
||||||
-- self:ScheduleRepeatingTimer(function() self:UpdateTargetDebuffs() end, 0.1)
|
|
||||||
|
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetCC.prototype:Disable(core)
|
function TargetCC.prototype:Disable(core)
|
||||||
TargetCC.super.prototype.Disable(self, core)
|
TargetCC.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
-- self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -88,15 +88,11 @@ function TargetInvuln.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_AURA", "UpdateTargetBuffs")
|
self:RegisterEvent("UNIT_AURA", "UpdateTargetBuffs")
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateTargetBuffs")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateTargetBuffs")
|
||||||
|
|
||||||
-- self:ScheduleRepeatingTimer(function() self:UpdateTargetBuffs() end, 0.1)
|
|
||||||
|
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetInvuln.prototype:Disable(core)
|
function TargetInvuln.prototype:Disable(core)
|
||||||
TargetInvuln.super.prototype.Disable(self, core)
|
TargetInvuln.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
-- self:CancelScheduledEvent(self.elementName)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
@ -8,6 +8,7 @@ TargetOfTarget.prototype.buffSize = nil
|
|||||||
TargetOfTarget.prototype.height = nil
|
TargetOfTarget.prototype.height = nil
|
||||||
TargetOfTarget.prototype.unit = nil
|
TargetOfTarget.prototype.unit = nil
|
||||||
TargetOfTarget.prototype.hadTarget = nil
|
TargetOfTarget.prototype.hadTarget = nil
|
||||||
|
TargetOfTarget.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
@ -210,7 +211,7 @@ end
|
|||||||
function TargetOfTarget.prototype:Enable(core)
|
function TargetOfTarget.prototype:Enable(core)
|
||||||
TargetOfTarget.super.prototype.Enable(self, 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)
|
RegisterUnitWatch(self.frame)
|
||||||
|
|
||||||
self:Update()
|
self:Update()
|
||||||
@ -220,7 +221,7 @@ end
|
|||||||
function TargetOfTarget.prototype:Disable(core)
|
function TargetOfTarget.prototype:Disable(core)
|
||||||
TargetOfTarget.super.prototype.Disable(self, core)
|
TargetOfTarget.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
|
|
||||||
UnregisterUnitWatch(self.frame)
|
UnregisterUnitWatch(self.frame)
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local TargetTargetCast = AceOO.Class(IceCastBar)
|
local TargetTargetCast = AceOO.Class(IceCastBar)
|
||||||
|
TargetTargetCast.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
local SelfDisplayModeOptions = {"Hide", "Normal"}
|
local SelfDisplayModeOptions = {"Hide", "Normal"}
|
||||||
|
|
||||||
@ -37,9 +38,14 @@ end
|
|||||||
function TargetTargetCast.prototype:Enable(core)
|
function TargetTargetCast.prototype:Enable(core)
|
||||||
TargetTargetCast.super.prototype.Enable(self, core)
|
TargetTargetCast.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:UpdateTargetTarget() end, 0.1)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("UpdateTargetTarget", 0.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TargetTargetCast.prototype:Disable(core)
|
||||||
|
TargetTargetCast.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
|
end
|
||||||
|
|
||||||
function TargetTargetCast.prototype:UpdateTargetTarget()
|
function TargetTargetCast.prototype:UpdateTargetTarget()
|
||||||
if not (UnitExists(self.unit)) then
|
if not (UnitExists(self.unit)) then
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local TargetTargetHealth = AceOO.Class(IceTargetHealth)
|
local TargetTargetHealth = AceOO.Class(IceTargetHealth)
|
||||||
|
TargetTargetHealth.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
local SelfDisplayModeOptions = {"Color as SelfColor", "Hide", "Normal"}
|
local SelfDisplayModeOptions = {"Color as SelfColor", "Hide", "Normal"}
|
||||||
|
|
||||||
@ -110,13 +111,13 @@ function TargetTargetHealth.prototype:Enable(core)
|
|||||||
self.moduleSettings.useSelfColor = nil
|
self.moduleSettings.useSelfColor = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:Update("targettarget") end, 0.1)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", 0.1, "targettarget")
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetTargetHealth.prototype:Disable(core)
|
function TargetTargetHealth.prototype:Disable(core)
|
||||||
TargetTargetHealth.super.prototype.Disable(self, core)
|
TargetTargetHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetTargetHealth.prototype:Update(unit)
|
function TargetTargetHealth.prototype:Update(unit)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local TargetTargetMana = AceOO.Class(IceTargetMana)
|
local TargetTargetMana = AceOO.Class(IceTargetMana)
|
||||||
|
TargetTargetMana.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
local SelfDisplayModeOptions = {"Hide", "Normal"}
|
local SelfDisplayModeOptions = {"Hide", "Normal"}
|
||||||
|
|
||||||
@ -60,13 +61,13 @@ function TargetTargetMana.prototype:Enable(core)
|
|||||||
self.determineColor = false
|
self.determineColor = false
|
||||||
TargetTargetMana.super.prototype.Enable(self, core)
|
TargetTargetMana.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:Update("targettarget") end, 0.1)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", 0.1, "targettarget")
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetTargetMana.prototype:Disable(core)
|
function TargetTargetMana.prototype:Disable(core)
|
||||||
TargetTargetMana.super.prototype.Disable(self, core)
|
TargetTargetMana.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetTargetMana.prototype:Update(unit)
|
function TargetTargetMana.prototype:Update(unit)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
--[[
|
--[[
|
||||||
Name: IceThreat
|
Name: IceThreat
|
||||||
Version: 1.2
|
|
||||||
Author: Caryna/Turalyon EU (Alliance) (updated for Threat-2.0 by 'acapela' of WoWI and merged into IceHUD by Parnic)
|
Author: Caryna/Turalyon EU (Alliance) (updated for Threat-2.0 by 'acapela' of WoWI and merged into IceHUD by Parnic)
|
||||||
Description: adds a threat bar to IceHUD
|
Description: adds a threat bar to IceHUD
|
||||||
]]
|
]]
|
||||||
@ -12,6 +11,7 @@ IceThreat = AceOO.Class(IceUnitBar)
|
|||||||
IceThreat.prototype.color = nil
|
IceThreat.prototype.color = nil
|
||||||
IceThreat.aggroBar = nil
|
IceThreat.aggroBar = nil
|
||||||
IceThreat.aggroBarMulti = nil
|
IceThreat.aggroBarMulti = nil
|
||||||
|
IceThreat.prototype.scheduledEvent = nil
|
||||||
|
|
||||||
local MAX_NUM_RAID_MEMBERS = 40
|
local MAX_NUM_RAID_MEMBERS = 40
|
||||||
local MAX_NUM_PARTY_MEMBERS = 5
|
local MAX_NUM_PARTY_MEMBERS = 5
|
||||||
@ -169,7 +169,7 @@ end
|
|||||||
function IceThreat.prototype:Enable(core)
|
function IceThreat.prototype:Enable(core)
|
||||||
IceThreat.super.prototype.Enable(self, core)
|
IceThreat.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:ScheduleRepeatingTimer(function() self:Update() end, 0.2)
|
self.scheduledEvent = self:ScheduleRepeatingTimer("Update", 0.2)
|
||||||
|
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
end
|
end
|
||||||
@ -178,7 +178,7 @@ end
|
|||||||
function IceThreat.prototype:Disable(core)
|
function IceThreat.prototype:Disable(core)
|
||||||
IceThreat.super.prototype.Disable(self, core)
|
IceThreat.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
self:CancelScheduledEvent(self.elementName)
|
self:CancelTimer(self.scheduledEvent, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
|
Reference in New Issue
Block a user