Get an Epic Experience with Premium

LibPetBreedInfo

Libraries Login to Add Favorites
  • 1 Like
  • World of Warcraft
  • 794 Monthly Downloads
  • Supports: 6.0.3
  • 2,927 Total Downloads
  • Updated 11/03/2014
  • Created 12/27/2012
  • 5 Favorites
  • Project Site
  • Release Type: Release
  • License: GNU Lesser General Public License version 3 (LGPLv3)
  • Newest File: 1.0.11
or

About LibPetBreedInfo

New Maintainer

Hi, Elegant here, I'll be picking up where Nullberri left off with this library and will be maintaining it going forward =D

Description

LibPetBreedInfo is a library for computing breed information for pets.

Example Usage

local LibPetBreedInfo = LibStub("LibPetBreedInfo-1.0")
local breedIndex, confidence = LibPetBreedInfo:GetBreedByPetID(C_PetJournal.GetPetInfoByIndex(1))
local breedName = LibPetBreedInfo:GetBreedName(breedIndex)
print(breedName)

GetBreedByPetBattleSlot(petOwner,id)

local breedIndex, confidence = LibPetBreedInfo:GetBreedByPetBattleSlot(petOwner,id)

Gets the breed index for the given pet Returns breedIndex, confidence breedIndex can be used by GetBreedName to return the breeds name. confidence, a number. higher numbers are better. good predictions start at confidence > 2.5

Caveats: Returns nil if the pet does not have a base stats profile or if the petOwner and id are not valid Results are not valid if computed while round play back is happening

GetBreedByPetID(petID)

local breedIndex, confidence = LibPetBreedInfo:GetBreedByPetID(petID)

Gets the breed index for the given pet Returns breedIndex ,confidence breedIndex can be used by GetBreedName to return the breeds name. confidence, a number. higher numbers are better. good predictions start at confidence > 2.5

Caveats: Returns nil if the species cannot battle or does not have a base stats profile or if the petID is not valid

GetBreedByStats(speciesID,level,rarity,health,power,speed)

local breedIndex, confidence = LibPetBreedInfo:GetBreedByStats(speciesID,level,rarity,health,power,speed)

Gets the breed index for the given pet Returns breedIndex ,confidence breedIndex can be used by GetBreedName to return the breeds name. confidence, a number. higher numbers are better. good predictions start at confidence > 2.5

Caveats: Returns nil if the species cannot battle or does not have a base stats profile

GetPetPredictedStats(speciesID, breedID, rarity, level)

local health, power, speed = LibPetBreedInfo:GetPetPredictedStats(speciesID, breedID, rarity, level)

Gets the predicted stats for a species at a given level returns health,power,speed

Caveats: returns nil if the pet does not have a base stats profile, or if an invalid... breedID, rarity, or non numeric level is given.

IterateBreedNames()

for breedID,breedName in LibPetBreedInfo:IterateBreedNames() do

Gets an ipair iterator for all of the possible breed names

GetBreedName(breedID)

local breedName =  LibPetBreedInfo:GetBreedName(breedID)

Gets the string representation of a BreedID

Caveats: BreedIDs are from 3-12 Returns nil for invalid breedID's

GetAvailableBreeds(speciesID)

local breedName =  LibPetBreedInfo:GetAvailableBreeds(speciesID)

returns a list of possible breedID's for a given speciesID returns nil if no data is present or if a speciesID is invalid

1.0.11 Added Grommloc's breed, fixed Syd the Squid's breed, added breeds for Christoph VonFeasel's team.

1.0.10 removed base stat profiles and opt'd for a database, added support for legendary pets, and added data for 5.3, 5.4 and 6.0 pets

1.0.9 additional breed updates
1.0.8 added preliminary data for 5.3 pets

1.0.7 added breed info for 5.2 pets

1.0.6 added nill check before using getPetInfo and getpetstats.
1.0.6 incremented minor version

1.0.5 returns nil if battle state information has not yet loaded when using GetBreedByPetBattleSlot
1.0.5 added out of bounds check for GetBreedByPetBattleSlot querying non existent pets

1.0.4 missed a comma

1.0.3 added non player pets to breed list
1.0.3 changed cinder kitten to correct base profile following a buff.
1.0.3 breedIndex now ranges between 3 and 12

1.0.2 optimized breed calculations
added possible pet breed data
confidence is now the ratio between the 2nd best / best in terms of fit. this means higher confidence numbers are better
confidence > 2.5 is a strong predictor of correctness.

1.0.1 added 20% to enemy pets hp in wild battles to get correct post capture hp and breed guess.

1.0 removed unused files

r6 changed variable names to be more conistant

r5 referenced wrong look up table in stat prediction

r4 stupid error

r3 fixed a find and replace mistake on line 138

r2 breed data is now embedded in the lib object

r1 intial release

Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Curse $5,000 Dreamhack CS:GO Skin Giveaway

Enter Now!