I am trying to find a way to get the current school of a spell.. Eg. Nature, Shadow, Holy etc.
I couldn't find any API function to retrieve the information directly, however I found that using GetSpellInfo I could get the icon path and the names of the icon paths seems to also contain spell school information.
It would be simple to just extract the spell-school information from icon links. However, this is a hack in my opinion. Is this a reliable way of getting spell-school information? Are there any better methods of getting spell-school information?
(funny how its spelled sear and shear btw, I'm not native English but I guess there is a difference.. must be an error from blizzard)
I am creating a custom castbar and I want to colour the castbar based on spellschool, so the information is needed as soon as the player starts casting.
The tooltip scanning sounds like an even greater hack than what I already do (and even more cumbersome). The combat log listening sounds interesting though. I would also like to keep track of silence effects, -in particular specific spell-school silence effects. I've never worked with the combat log before so I appreciate that link a lot, thanks! :)
I think I'm gonna roll with my own spell-school fetching hack for a while though because of its simplicity. I guess I can just create one of each class to test the consistency in the spell naming. For now it works brilliant for my priest.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I couldn't find any API function to retrieve the information directly, however I found that using GetSpellInfo I could get the icon path and the names of the icon paths seems to also contain spell school information.
Eg.
GetSpellInfo("Mind Sear")
... Interface\Spell_Shadow_MindShear ...
GetSpellInfo("Flash Heal")
... Interface\Spell_Holy_FlashHeal ...
It would be simple to just extract the spell-school information from icon links. However, this is a hack in my opinion. Is this a reliable way of getting spell-school information? Are there any better methods of getting spell-school information?
(funny how its spelled sear and shear btw, I'm not native English but I guess there is a difference.. must be an error from blizzard)
If you want to get a specific spell ID's school you could maybe do it with tooltip scanning, or some other way ...
But it's not really feasible, you'd have to extract the school name from the spell description
http://forums.wowace.com/showthread.php?t=19703
http://www.mmo-champion.com/threads/969175-Dynamic-casting-time-addon
The tooltip scanning sounds like an even greater hack than what I already do (and even more cumbersome). The combat log listening sounds interesting though. I would also like to keep track of silence effects, -in particular specific spell-school silence effects. I've never worked with the combat log before so I appreciate that link a lot, thanks! :)
I think I'm gonna roll with my own spell-school fetching hack for a while though because of its simplicity. I guess I can just create one of each class to test the consistency in the spell naming. For now it works brilliant for my priest.