Battle pet Sample

Feb 26, 2013 at 9:42 AM
Hi,

i want to make my own xml database with all battle pet and their abilities.

How can i start this?

Cheers
Coordinator
Feb 26, 2013 at 6:02 PM
The library (via Blizzard's APIs) offers you 3 APIs you can use:

GetBattlePetSpecies
GetBattlePetAbility
GetBattlePetType

However, Blizzard's APIs (and hence wowsharp library) doesn't expose an API call to get all possible species IDs. You can ofcourse try to loop from 1 to N and trying all possible ID, and handle the error if the ID is not valid. Problem is I don't know what is the maximum ID.

After getting the species, you can use GetBattlePetAbility and GetBattlePetType to lookup the pet types and pet abilities returned.

Using this data you can make your database. If it's an xml database, the classes returned by the library are all marked with DataContractAttribute and DataContractSerializer class can you serialize the data as xml.
Feb 27, 2013 at 8:56 AM
Thxs,

i will try this :)