Originally Posted by Lombra
The old/current IsSpellKnown had a lot of "problems" with not recognising known spells. Namely a lot of spell IDs extracted from a combat log event were different than the ID of the same spell in your spell book, the latter of which worked with IsSpellKnown, while the combat log event did not. I've had to make a lot of special cases because of this. As far as I understand this function is now replaced with IsPlayerSpell.. has anyone noticed if this one is at all improved in this regard?
|
Currently, IsPlayerSpell is only used in ShardBar.lua to do stuff like "only show the shard bar if you're Affliction spec AND you know Soulburn". According to the
Wowpedia docs its intended use is to check "does the player know this OR a spell that replaces this?", and should be used with the ID of the base spell, not the spell that replaces it.
So, for a shaman you should query the ID for Cleanse Spirit, not Purify Spirit (PS replaces CS for resto), and for a monk you should query Roll, not Chi Torpedo.
I'm not sure what the recommended API for determining whether the player has a particular upgrade is (eg. has the monk replaced Roll with Chi Torpedo?) or figuring out the associations. Probably you'll just have to keep doing it by hand if you need to know the specifics.