From a1b7153bfc028153af468d81e46adcada7eb93ac Mon Sep 17 00:00:00 2001 From: Tercioo Date: Fri, 9 Aug 2019 11:36:11 -0300 Subject: [PATCH] Classic WoW hot fix --- functions/spellcache.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/functions/spellcache.lua b/functions/spellcache.lua index a8a29ca0e..f19f0def1 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -220,7 +220,9 @@ do if (t) then local spellid = t [1] local name, _, icon = _GetSpellInfo (spellid) - _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) + if (name) then + _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) + end return tremove (_detalhes.savedCustomSpells, index) end @@ -231,10 +233,13 @@ do _detalhes.getspellinfo = function (spellid) return _unpack (_detalhes.spellcache[spellid]) end _detalhes.GetSpellInfo = _detalhes.getspellinfo - --> overwrite SpellInfo if spell is a Dot, so GetSpellInfo will return the name modified + --> overwrite SpellInfo if the spell is a DoT, so Details.GetSpellInfo will return the name modified function _detalhes:SpellIsDot (spellid) - local nome, rank, icone = _GetSpellInfo (spellid) - _rawset (_detalhes.spellcache, spellid, {nome .. Loc ["STRING_DOT"], rank, icone}) + local spellName, rank, spellIcon = _GetSpellInfo (spellid) + + if (spellName) then + _rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon}) + end end --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------