Thread Tools Display Modes
04-27-16, 03:51 PM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Is it safe to cache the spellbook?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off