Skip to content

Commit

Permalink
Added better error-checking to the new "Collected" tooltip line.
Browse files Browse the repository at this point in the history
  • Loading branch information
MMOSimca committed Jun 3, 2024
1 parent b13d8c2 commit aa2c73e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BreedTooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,14 @@ function BPBID_SetBreedTooltip(parent, speciesID, tblBreedID, rareness, tooltipD
breedtip:AddLine(current, 1, 1, 1, 1)
end

-- Set line for "Collected"
if (BPBID_Options.Breedtip.Collected) then
C_PetJournal.ClearSearchFilter()
numPets, numOwned = C_PetJournal.GetNumPets()
local collectedPets = {}
for i = 1, numPets do
local petID, speciesID2, owned, customName, level, favorite, isRevoked, speciesName, icon, petType, companionID, tooltip, description, isWild, canBattle, isTradeable, isUnique, obtainable = C_PetJournal.GetPetInfoByIndex(i)
if speciesID2 == speciesID then
if petID and speciesID2 == speciesID then
local speciesID, customName, level, xp, maxXp, displayID, isFavorite, name, icon, petType, creatureID, sourceText, description, isWild, canBattle, tradable, unique, obtainable = C_PetJournal.GetPetInfoByPetID(petID)
local health, maxHealth, power, speed, rarity = C_PetJournal.GetPetStats(petID)

Expand Down

0 comments on commit aa2c73e

Please sign in to comment.