mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- replaced AceEvent-2.0 with AceEvent-3.0/AceTimer-3.0
This commit is contained in:
@ -236,7 +236,7 @@ function TargetCC.prototype:Enable(core)
|
||||
self:RegisterEvent("UNIT_AURA", "UpdateTargetDebuffs")
|
||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateTargetDebuffs")
|
||||
|
||||
-- self:ScheduleRepeatingEvent(self.elementName, self.UpdateTargetDebuffs, 0.1, self)
|
||||
-- self:ScheduleRepeatingTimer(function() self:UpdateTargetDebuffs() end, 0.1)
|
||||
|
||||
self:Show(false)
|
||||
end
|
||||
@ -337,10 +337,10 @@ function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
|
||||
return unpack(result)
|
||||
end
|
||||
|
||||
function TargetCC.prototype:UpdateTargetDebuffs(unit, isUpdate)
|
||||
function TargetCC.prototype:UpdateTargetDebuffs(event, unit, isUpdate)
|
||||
local name, duration, remaining
|
||||
if not isUpdate then
|
||||
self.frame:SetScript("OnUpdate", function() self:UpdateTargetDebuffs(self.unit, true) end)
|
||||
self.frame:SetScript("OnUpdate", function() self:UpdateTargetDebuffs(nil, self.unit, true) end)
|
||||
self.debuffName, self.debuffDuration, self.debuffRemaining = self:GetMaxDebuffDuration(self.unit, self.debuffList)
|
||||
else
|
||||
self.debuffRemaining = math.max(0, self.debuffRemaining - (1.0 / GetFramerate()))
|
||||
|
Reference in New Issue
Block a user