Module:Magic: Difference between revisions

65 bytes removed ,  29 September 2021
magicLevelRequired -> level to match change for v0.22
(getAltSpellsTable)
(magicLevelRequired -> level to match change for v0.22)
Line 93: Line 93:
function p._getSpellRequirements(spell)
function p._getSpellRequirements(spell)
   local result = ''
   local result = ''
   result = result..Icons._SkillReq('Magic', spell.magicLevelRequired)
   result = result..Icons._SkillReq('Magic', spell.level)
   if spell.requiredItem ~= nil and spell.requiredItem >= 0 then
   if spell.requiredItem ~= nil and spell.requiredItem >= 0 then
     local reqItem = Items.getItemByID(spell.requiredItem)
     local reqItem = Items.getItemByID(spell.requiredItem)
Line 232: Line 232:
                 return p.getSpellTypeIndex(a.type) < p.getSpellTypeIndex(b.type)
                 return p.getSpellTypeIndex(a.type) < p.getSpellTypeIndex(b.type)
               else
               else
                 return a.magicLevelRequired < b.magicLevelRequired
                 return a.level < b.level
               end
               end
             end)
             end)
Line 278: Line 278:
   end
   end
   rowTxt = rowTxt..'||[['..spell.name..']]'
   rowTxt = rowTxt..'||[['..spell.name..']]'
   rowTxt = rowTxt..'||data-sort-value="'..spell.magicLevelRequired..'"|'..Icons._SkillReq('Magic', spell.magicLevelRequired)
   rowTxt = rowTxt..'||data-sort-value="'..spell.level..'"|'..Icons._SkillReq('Magic', spell.level)
   --Handle required items/dungeon clears
   --Handle required items/dungeon clears
   if spell.requiredItem ~= nil and spell.requiredItem >= 0 then
   if spell.requiredItem ~= nil and spell.requiredItem >= 0 then