Module:Pets: Difference between revisions

Added new getPets function for use in the new ModifierTables module that's in progress
(Added link to boss pets from dungeon pet text)
(Added new getPets function for use in the new ModifierTables module that's in progress)
Line 47: Line 47:
       result.id = i - 1
       result.id = i - 1
       break
       break
    end
  end
  return result
end
function p.getPets(checkFunc)
  local result = {}
  for i, pet in Shared.skpairs(PetData.Pets) do
    if checkFunc(pet) then
      local newPet = Shared.clone(pet)
      newPet.id = i - 1
      table.insert(result, newPet)
     end
     end
   end
   end