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.