Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
getSpellsUsingItem: Correct too many spells being returned
(_getSpellTemplateData: Resolve error with fixedItemCosts data)
(getSpellsUsingItem: Correct too many spells being returned)
Line 436: Line 436:
     for i, spellBook in ipairs(p.spellBooks) do
     for i, spellBook in ipairs(p.spellBooks) do
         local spells = p.getSpellsBySpellBook(spellBook.id)
         local spells = p.getSpellsBySpellBook(spellBook.id)
        local foundSpell = false
         for j, spell in ipairs(spells) do
         for j, spell in ipairs(spells) do
        local foundSpell = false
             -- Check runes first
             -- Check runes first
             for k, runeKey in ipairs(runeKeys) do
             for k, runeKey in ipairs(runeKeys) do