Fix error when using an invalid spell with a custom bar on 11.x

This commit is contained in:
Parnic
2024-08-14 11:34:54 -05:00
parent 73891bca4b
commit 30ec3750c1
6 changed files with 36 additions and 4 deletions

View File

@ -1,5 +1,9 @@
# Changelog
v1.15.5:
- Fix error when using an invalid spell with a custom bar on 11.x
v1.15.4:
- Update TOC for TWW

View File

@ -20,9 +20,15 @@ end
local GetSpellInfo = GetSpellInfo
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
GetSpellInfo = function(id)
if not id then
return nil
end
local info = C_Spell.GetSpellInfo(id)
if info then
return info.name, nil, info.iconID
end
end
end
IceCustomBar.prototype.auraDuration = -1

View File

@ -30,9 +30,15 @@ end
local GetSpellInfo = GetSpellInfo
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
GetSpellInfo = function(id)
if not id then
return nil
end
local info = C_Spell.GetSpellInfo(id)
if info then
return info.name, nil, info.iconID
end
end
end
local GetSpellCooldown = GetSpellCooldown

View File

@ -10,9 +10,15 @@ local DefaultAuraIcon = "Interface\\Icons\\Spell_Frost_Frost"
local GetSpellInfo = GetSpellInfo
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
GetSpellInfo = function(id)
if not id then
return nil
end
local info = C_Spell.GetSpellInfo(id)
if info then
return info.name, nil, info.iconID
end
end
end
function IceCustomCounterBar.prototype:init()

View File

@ -9,9 +9,15 @@ end
local GetSpellInfo = GetSpellInfo
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
GetSpellInfo = function(id)
if not id then
return nil
end
local info = C_Spell.GetSpellInfo(id)
if info then
return info.name, nil, info.iconID, info.castTime
end
end
end
local GetSpellCooldown = GetSpellCooldown

View File

@ -1,5 +1,9 @@
# Changelog
v1.15.5:
- Fix error when using an invalid spell with a custom bar on 11.x
v1.15.4:
- Update TOC for TWW