Skip to content

Commit a1b7153

Browse files
committed
Classic WoW hot fix
1 parent 9071980 commit a1b7153

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

functions/spellcache.lua

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ do
220220
if (t) then
221221
local spellid = t [1]
222222
local name, _, icon = _GetSpellInfo (spellid)
223-
_rawset (_detalhes.spellcache, spellid, {name, 1, icon})
223+
if (name) then
224+
_rawset (_detalhes.spellcache, spellid, {name, 1, icon})
225+
end
224226
return tremove (_detalhes.savedCustomSpells, index)
225227
end
226228

@@ -231,10 +233,13 @@ do
231233
_detalhes.getspellinfo = function (spellid) return _unpack (_detalhes.spellcache[spellid]) end
232234
_detalhes.GetSpellInfo = _detalhes.getspellinfo
233235

234-
--> overwrite SpellInfo if spell is a Dot, so GetSpellInfo will return the name modified
236+
--> overwrite SpellInfo if the spell is a DoT, so Details.GetSpellInfo will return the name modified
235237
function _detalhes:SpellIsDot (spellid)
236-
local nome, rank, icone = _GetSpellInfo (spellid)
237-
_rawset (_detalhes.spellcache, spellid, {nome .. Loc ["STRING_DOT"], rank, icone})
238+
local spellName, rank, spellIcon = _GetSpellInfo (spellid)
239+
240+
if (spellName) then
241+
_rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon})
242+
end
238243
end
239244

240245
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)