I’ve been making macros for various characters to check whether I have learned certain spells (or the like) which are taught by items but do not show up in the spell book. For example, I made this macro to track the progress of the various Shaman-specific weapon illusions (since there’s no real way to easily identify them once learned)…
/script a={"Earthliving","Flametongue","Frostbrand","Rockbiter","Windfury"}; b={42941,42942,42943,42944,42945} for c = 1, 5 do print(format("%s: %s", a[c], IsQuestFlaggedCompleted(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))
I was trying to make macros for my hunter to check whether I have learned the various tomes which unlock the ability to tame new pet families. One works just fine (despite the latter two families not being available until Shadowlands)…
/script a={"Blood Beasts","Cloud Serpents","Undead"}; b={54753,62254,62255} for c = 1, 3 do print(format("%s: %s", a[c], IsQuestFlaggedCompleted(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))
The other macro won’t work however…
/script a={"Direhorns","Mechanicals","Feathermanes"}; b={138430,205154,242155} for c = 1, 3 do print(format("%s: %s", a[c], IsSpellKnown(b[c]) and "\124cff00ff00Yes\124r" or "\124cffff0000No\124r"))
The reason it isn’t working is because the first three item-locked pet families added to the game (which also happen to be the only ones which are character-specific unlocks, not account wide) don’t flag a hidden quest as complete when learned but rather teach a spell which is not listed in your spellbook. I was wondering if there is a different way to determine whether the spells are known, maybe by determining if the tomes are no longer usable? Any ideas?