Anonymous

Module:Magic: Difference between revisions

From Melvor Idle
no edit summary
(Removed normal levels from abyssal spellbook table; Sort by AbyssaLevel or Level)
No edit summary
Line 80: Line 80:
end
end


function p.getSpellByProperty(spellProperty, propertyName, spellType)
function p.getSpellByProperty(spellProperty, propertyName, spellType, namespace)
if spellType == nil then
if spellType == nil then
-- Look for spell in all spellbooks
-- Look for spell in all spellbooks
Line 88: Line 88:
local spell = GameData.getEntityByProperty(spells, propertyName, spellProperty)
local spell = GameData.getEntityByProperty(spells, propertyName, spellProperty)
if spell ~= nil then
if spell ~= nil then
return spell
local ns, _ = Shared.getLocalID(spell.id)
if namespace == nil or ns == namespace then
return spell
end
end
end
end
end
2,875

edits