Is it safe to cache the spellbook?
I'm scanning the spellbook to find which spells give back a resource and have a cast time.
I do this on a SPELLS_CHANGED event. But buffs can also cause the resource returned on certain spells to change. So when I get an UNIT_AURA event. I don't want to have to scan thru 1 to 1024 (number taken from blizzard code) each time.
So what I rather do is just scan the GetSpellBookItemInfo() and just scan the index of the spells I found during SPELLS_CHANGED event. If the spell indexes stay constant outside of SPELLS_CHANGED event then I can do this.
Thanks
Edit: Decided to just cache the spells instead. Problem solved.
Last edited by galvin : 04-27-16 at 04:49 PM.
|