Thread Tools Display Modes
01-05-17, 08:45 PM   #1
Aadä
A Murloc Raider
Join Date: Oct 2016
Posts: 7
GetAchievementCriteriaInfoByID and battle pets collected

I am trying to generate a list of which battle pets have been learned by a character (since it's character bound, see http://www.wowhead.com/achievement=3...ity-pets-owned)

My problem is I don't see any attempt working, Kenegasi on wowhead provided an excellent script to do that with tabards
Code:
for i=1,99999 do
	local s,_,d,_,_,_,_,l=GetAchievementCriteriaInfoByID(621,i)
	if s then
		if l then 
		_,l=GetItemInfo(l)
		end
		if not d then
		print(l and "- "..l or "- "..s)
		end
	end
end

Now I try to replace 621 by 338, or by even any number related to achievements tracking the collection of unique battle pets, and I really can't figure out how to get this list. I'm interested to hook that into battle pet tooltips (the actual item, not the "new" battle pet special tooltips)

I'm convinced it's possible to get the list because the counter still perfectly works and add +1 when you learn a battle pet that has not already been added in the collection with this character, and it doesn't add anything if the pet has already been added by this character. so at the moment you right click, a query is made that checks in your character database whether or not you already right clicked that specific pet, it has the data.

the next step would be to do that for mounts, but I'm not sure the data exist since the account wide mount system. there is still a mount learned counter on the character stats panel, maybe a starting point ...

Any ideas ? thanks

Last edited by Aadä : 01-05-17 at 08:52 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » GetAchievementCriteriaInfoByID and battle pets collected

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off