mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Changed how cooldowns are started (ticket #205)
This commit is contained in:
@ -3,6 +3,11 @@ local Runes = IceCore_CreateClass(IceElement)
|
|||||||
|
|
||||||
local IceHUD = _G.IceHUD
|
local IceHUD = _G.IceHUD
|
||||||
|
|
||||||
|
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
|
||||||
|
if IceHUD.WowVer >= 70000 then
|
||||||
|
CooldownFrame_SetTimer = CooldownFrame_Set
|
||||||
|
end
|
||||||
|
|
||||||
-- blizzard cracks me up. the below block is copied verbatim from RuneFrame.lua ;)
|
-- blizzard cracks me up. the below block is copied verbatim from RuneFrame.lua ;)
|
||||||
--Readability == win
|
--Readability == win
|
||||||
local RUNETYPE_BLOOD = 1;
|
local RUNETYPE_BLOOD = 1;
|
||||||
@ -277,12 +282,12 @@ function Runes.prototype:UpdateRunePower(event, rune, dontFlash)
|
|||||||
end
|
end
|
||||||
elseif start ~= nil and duration ~= nil then
|
elseif start ~= nil and duration ~= nil then
|
||||||
if self.moduleSettings.cooldownMode == "Cooldown" then
|
if self.moduleSettings.cooldownMode == "Cooldown" then
|
||||||
self.frame.graphical[rune].cd:SetCooldown(start, duration)
|
CooldownFrame_SetTimer(self.frame.graphical[rune].cd, start, duration, true)
|
||||||
self.frame.graphical[rune].cd:Show()
|
self.frame.graphical[rune].cd:Show()
|
||||||
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
elseif self.moduleSettings.cooldownMode == "Alpha" then
|
||||||
self.frame.graphical[rune]:SetAlpha(0.2)
|
self.frame.graphical[rune]:SetAlpha(0.2)
|
||||||
elseif self.moduleSettings.cooldownMode == "Both" then
|
elseif self.moduleSettings.cooldownMode == "Both" then
|
||||||
self.frame.graphical[rune].cd:SetCooldown(start, duration)
|
CooldownFrame_SetTimer(self.frame.graphical[rune].cd, start, duration, true)
|
||||||
self.frame.graphical[rune].cd:Show()
|
self.frame.graphical[rune].cd:Show()
|
||||||
self.frame.graphical[rune]:SetAlpha(0.2)
|
self.frame.graphical[rune]:SetAlpha(0.2)
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||||
IceTargetInfo = IceCore_CreateClass(IceElement)
|
IceTargetInfo = IceCore_CreateClass(IceElement)
|
||||||
|
|
||||||
|
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
|
||||||
|
if IceHUD.WowVer >= 70000 then
|
||||||
|
CooldownFrame_SetTimer = CooldownFrame_Set
|
||||||
|
end
|
||||||
|
|
||||||
local DogTag = nil
|
local DogTag = nil
|
||||||
|
|
||||||
local internal = "internal"
|
local internal = "internal"
|
||||||
@ -1445,7 +1450,7 @@ function IceTargetInfo.prototype:SetupAura(aura, i, icon, duration, expirationTi
|
|||||||
if (duration and duration > 0 and expirationTime and expirationTime > 0) then
|
if (duration and duration > 0 and expirationTime and expirationTime > 0) then
|
||||||
local start = expirationTime - duration
|
local start = expirationTime - duration
|
||||||
|
|
||||||
frame.cd:SetCooldown(start, duration)
|
CooldownFrame_SetTimer(frame.cd, start, duration, true)
|
||||||
frame.cd:Show()
|
frame.cd:Show()
|
||||||
else
|
else
|
||||||
frame.cd:Hide()
|
frame.cd:Hide()
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||||
local Totems = IceCore_CreateClass(IceElement)
|
local Totems = IceCore_CreateClass(IceElement)
|
||||||
|
|
||||||
|
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
|
||||||
|
if IceHUD.WowVer >= 70000 then
|
||||||
|
CooldownFrame_SetTimer = CooldownFrame_Set
|
||||||
|
end
|
||||||
|
|
||||||
-- the below block is copied from TotemFrame.lua
|
-- the below block is copied from TotemFrame.lua
|
||||||
local FIRE_TOTEM_SLOT = 1;
|
local FIRE_TOTEM_SLOT = 1;
|
||||||
local EARTH_TOTEM_SLOT = 2;
|
local EARTH_TOTEM_SLOT = 2;
|
||||||
@ -239,7 +244,7 @@ function Totems.prototype:UpdateTotem(event, totem, ...)
|
|||||||
local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem);
|
local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem);
|
||||||
if duration > 0 then
|
if duration > 0 then
|
||||||
self.frame.graphical[totem].totem:SetTexture(icon)
|
self.frame.graphical[totem].totem:SetTexture(icon)
|
||||||
self.frame.graphical[totem].cd:SetCooldown(startTime, duration)
|
CooldownFrame_SetTimer(self.frame.graphical[totem].cd, startTime, duration, true)
|
||||||
self.frame.graphical[totem].cd:Show()
|
self.frame.graphical[totem].cd:Show()
|
||||||
self.frame.graphical[totem]:Show()
|
self.frame.graphical[totem]:Show()
|
||||||
else
|
else
|
||||||
@ -367,7 +372,7 @@ function Totems.prototype:CreateTotem(i, name)
|
|||||||
self.frame.graphical[i].cd:ClearAllPoints()
|
self.frame.graphical[i].cd:ClearAllPoints()
|
||||||
self.frame.graphical[i].cd:SetAllPoints(self.frame.graphical[i])
|
self.frame.graphical[i].cd:SetAllPoints(self.frame.graphical[i])
|
||||||
if duration > 0 then
|
if duration > 0 then
|
||||||
self.frame.graphical[i].cd:SetCooldown(startTime, duration)
|
CooldownFrame_SetTimer(self.frame.graphical[i].cd, startTime, duration, true)
|
||||||
self.frame.graphical[i].cd:Show()
|
self.frame.graphical[i].cd:Show()
|
||||||
self.frame.graphical[i]:Show()
|
self.frame.graphical[i]:Show()
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user