mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
42e76dde72 | |||
43aa303887 |
@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.15.7:
|
||||||
|
|
||||||
|
- Fix cooldown display for overridden spells (such as Evoker spells where Font of Magic replaces the base spell with an override with the same name).
|
||||||
|
|
||||||
|
v1.15.6:
|
||||||
|
|
||||||
|
- Package new version of LibDogTag-Unit to fix an error with some units on 11.0.2
|
||||||
|
|
||||||
v1.15.5:
|
v1.15.5:
|
||||||
|
|
||||||
- Fix error when using an invalid spell with a custom bar on 11.x
|
- Fix error when using an invalid spell with a custom bar on 11.x
|
||||||
|
@ -36,7 +36,7 @@ if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
|||||||
|
|
||||||
local info = C_Spell.GetSpellInfo(id)
|
local info = C_Spell.GetSpellInfo(id)
|
||||||
if info then
|
if info then
|
||||||
return info.name, nil, info.iconID
|
return info.name, nil, info.iconID, info.spellID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -636,8 +636,18 @@ end
|
|||||||
|
|
||||||
-- 'Protected' methods --------------------------------------------------------
|
-- 'Protected' methods --------------------------------------------------------
|
||||||
|
|
||||||
|
function IceCustomCDBar.prototype:GetCooldownDurationOverride(spellID)
|
||||||
|
if spellID and FindSpellOverrideByID then
|
||||||
|
local override = FindSpellOverrideByID(spellID)
|
||||||
|
if override and override ~= spellID then
|
||||||
|
return self:GetCooldownDuration(override)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function IceCustomCDBar.prototype:GetCooldownDuration(buffName)
|
function IceCustomCDBar.prototype:GetCooldownDuration(buffName)
|
||||||
buffName = self:GetSpellNameOrId(buffName)
|
local spellID
|
||||||
|
buffName, spellID = self:GetSpellNameOrId(buffName)
|
||||||
|
|
||||||
local now = GetTime()
|
local now = GetTime()
|
||||||
local localRemaining = nil
|
local localRemaining = nil
|
||||||
@ -646,7 +656,7 @@ function IceCustomCDBar.prototype:GetCooldownDuration(buffName)
|
|||||||
if hasCooldown then
|
if hasCooldown then
|
||||||
-- the item has a potential cooldown
|
-- the item has a potential cooldown
|
||||||
if localDuration <= 1.5 then
|
if localDuration <= 1.5 then
|
||||||
return nil, nil
|
return self:GetCooldownDurationOverride(spellID)
|
||||||
end
|
end
|
||||||
|
|
||||||
localRemaining = localDuration + (localStart - now)
|
localRemaining = localDuration + (localStart - now)
|
||||||
@ -657,7 +667,7 @@ function IceCustomCDBar.prototype:GetCooldownDuration(buffName)
|
|||||||
|
|
||||||
return localDuration, localRemaining
|
return localDuration, localRemaining
|
||||||
else
|
else
|
||||||
return nil, nil
|
return self:GetCooldownDurationOverride(spellID)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -868,7 +878,8 @@ function IceCustomCDBar.prototype:IsReady()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomCDBar.prototype:GetSpellNameOrId(spellName)
|
function IceCustomCDBar.prototype:GetSpellNameOrId(spellName)
|
||||||
return spellName
|
local id = select(4, GetSpellInfo(spellName))
|
||||||
|
return spellName, id
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomCDBar.prototype:Show(bShouldShow, bForceHide)
|
function IceCustomCDBar.prototype:Show(bShouldShow, bForceHide)
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.15.7:
|
||||||
|
|
||||||
|
- Fix cooldown display for overridden spells (such as Evoker spells where Font of Magic replaces the base spell with an override with the same name).
|
||||||
|
|
||||||
|
v1.15.6:
|
||||||
|
|
||||||
|
- Package new version of LibDogTag-Unit to fix an error with some units on 11.0.2
|
||||||
|
|
||||||
v1.15.5:
|
v1.15.5:
|
||||||
|
|
||||||
- Fix error when using an invalid spell with a custom bar on 11.x
|
- Fix error when using an invalid spell with a custom bar on 11.x
|
||||||
|
Reference in New Issue
Block a user