View Single Post
10-17-14, 12:22 PM   #30
another
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 11
I'm using "spell" and spell name too As attributes.
Yes, I checked, when dragged from secure buttons its old "mount" and old style spellbook index (slot) ... But

Code:
	for slot = 1, GetNumCompanions(compType) do
		--creatureID, creatureName, creatureSpellID, icon, issummoned
		local creatureID, name, id = GetCompanionInfo(compType, slot)
		print(creatureID, name, id)
		local spellName = GetSpellInfo(id)
		if spellName then
			cache2slot[spellName] = {slot, compType}
			print("CacheCompanionSpells", spellName, slot, compType)
		end
	end
not works anymore for "MOUNT" (returns nils). What a mess ...

Found short way of getting mount journal index to spell id without hooks to MountJournal buttons "OnEnter". It's
Code:
	for i=1, C_MountJournal.GetNumMounts() do
		local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, _, _, hideOnChar, isCollected = C_MountJournal.GetMountInfo(i)

		MountJournalIndexToSpellID[i] = spellID
	end
I think it will be broken until some 6.2 patch (as always). Maybe we should stop making hacks to make our addons almost working. Let players whining and complaining on Blizzard forums about broken addons. To force Blizzard make proper API.

P.S. I disabled battlepet's support completely in my addons. Except I like to have several my favorite mounts in short dropdown list ..

Last edited by another : 10-17-14 at 12:26 PM. Reason: P.S.