I suspect this is one of those areas where they pulled in the retail version of the Collections system rather than grab out the old classic version.
I'm gonna see if I can simulate that for loop with the new functionality in 3.4.3 but I've not touched this part of the API before so in the mean time ... here's the warcraft.wiki ( formerly known as wowpedia rofl ) for what I think they have replaced it with.
https://warcraft.wiki.gg/wiki/World_...PI#Collections
Yep, this seems to be working as I thought. Here's the lua and toc for a quick test addon
Lua Code:
local function CheckMounts()
local mountIDs = C_MountJournal.GetMountIDs()
for i = 1, #mountIDs do
local name, spellID, icon, isActive, isUsable, sourceType, isFavorite, isFactionSpecific, faction, shouldHideOnChar, isCollected, mountID = C_MountJournal.GetMountInfoByID(i)
print(mountID,name,isCollected,sourceType,spellID,icon,isActive)
end
end
local function OnEvent(self,event,...)
if event == "ADDON_LOADED" then
CheckMounts()
elseif event == "PLAYER_LOGIN" then
--CheckMounts()
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent",OnEvent)
Lua Code:
## Interface: 30403
## Version: v0.0.1
## Title: Collection Info Test
## Notes: Testing Collection Info functionality
## Author: Xrystal
## SavedVariables:
## Dependencies: Blizzard_Collections
## OptionalDeps:
## IconTexture:
## DefaultState: Enabled
## LoadOnDemand: 0
CollectionInfoTest.lua