mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Fix error when using an invalid spell with a custom bar on 11.x
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.15.5:
|
||||||
|
|
||||||
|
- Fix error when using an invalid spell with a custom bar on 11.x
|
||||||
|
|
||||||
v1.15.4:
|
v1.15.4:
|
||||||
|
|
||||||
- Update TOC for TWW
|
- Update TOC for TWW
|
||||||
|
@ -20,10 +20,16 @@ end
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
||||||
GetSpellInfo = function(id)
|
GetSpellInfo = function(id)
|
||||||
|
if not id then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local info = C_Spell.GetSpellInfo(id)
|
local info = C_Spell.GetSpellInfo(id)
|
||||||
|
if info then
|
||||||
return info.name, nil, info.iconID
|
return info.name, nil, info.iconID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
IceCustomBar.prototype.auraDuration = -1
|
IceCustomBar.prototype.auraDuration = -1
|
||||||
IceCustomBar.prototype.auraEndTime = -1
|
IceCustomBar.prototype.auraEndTime = -1
|
||||||
|
@ -30,10 +30,16 @@ end
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
||||||
GetSpellInfo = function(id)
|
GetSpellInfo = function(id)
|
||||||
|
if not id then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local info = C_Spell.GetSpellInfo(id)
|
local info = C_Spell.GetSpellInfo(id)
|
||||||
|
if info then
|
||||||
return info.name, nil, info.iconID
|
return info.name, nil, info.iconID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local GetSpellCooldown = GetSpellCooldown
|
local GetSpellCooldown = GetSpellCooldown
|
||||||
if not GetSpellCooldown and C_Spell then
|
if not GetSpellCooldown and C_Spell then
|
||||||
|
@ -10,10 +10,16 @@ local DefaultAuraIcon = "Interface\\Icons\\Spell_Frost_Frost"
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
||||||
GetSpellInfo = function(id)
|
GetSpellInfo = function(id)
|
||||||
|
if not id then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local info = C_Spell.GetSpellInfo(id)
|
local info = C_Spell.GetSpellInfo(id)
|
||||||
|
if info then
|
||||||
return info.name, nil, info.iconID
|
return info.name, nil, info.iconID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function IceCustomCounterBar.prototype:init()
|
function IceCustomCounterBar.prototype:init()
|
||||||
IceCustomCounterBar.super.prototype.init(self, "CustomCounterBar")
|
IceCustomCounterBar.super.prototype.init(self, "CustomCounterBar")
|
||||||
|
@ -9,10 +9,16 @@ end
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
|
||||||
GetSpellInfo = function(id)
|
GetSpellInfo = function(id)
|
||||||
|
if not id then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local info = C_Spell.GetSpellInfo(id)
|
local info = C_Spell.GetSpellInfo(id)
|
||||||
|
if info then
|
||||||
return info.name, nil, info.iconID, info.castTime
|
return info.name, nil, info.iconID, info.castTime
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local GetSpellCooldown = GetSpellCooldown
|
local GetSpellCooldown = GetSpellCooldown
|
||||||
if not GetSpellCooldown and C_Spell then
|
if not GetSpellCooldown and C_Spell then
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.15.5:
|
||||||
|
|
||||||
|
- Fix error when using an invalid spell with a custom bar on 11.x
|
||||||
|
|
||||||
v1.15.4:
|
v1.15.4:
|
||||||
|
|
||||||
- Update TOC for TWW
|
- Update TOC for TWW
|
||||||
|
Reference in New Issue
Block a user