Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
fixed an error when getting spell descriptions sometimes
(magicLevelRequired -> level to match change for v0.22)
(fixed an error when getting spell descriptions sometimes)
Line 135: Line 135:
   local result = ''
   local result = ''
   if spell.description ~= nil then
   if spell.description ~= nil then
     if p.getSpellTypeIndex(spell.type) == 4 then
     if p.getSpellTypeIndex(spell.type) == 4 and string.find(spell.description, "<br>") ~= nil then
       result = string.sub(spell.description, 0, string.find(spell.description, "<br>")-1)
       result = string.sub(spell.description, 0, string.find(spell.description, "<br>")-1)
     else
     else