Skip to content

Commit 72f9d8e

Browse files
committed
Cache all spellbook tabs
Resolves #115
1 parent 76adfe8 commit 72f9d8e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ globals = {
3838
"GetItemCount",
3939
"GetItemIcon",
4040
"GetItemInfo",
41+
"GetNumSpellTabs",
4142
"GetPlayerInfoByGUID",
4243
"GetPVPRankInfo",
4344
"GetPVPSessionStats",

Data/Cooldowns.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ end
8181
function module:ResetSpells(e)
8282
wipe(spells)
8383
wipe(spellCooldowns)
84-
-- cache spells from our current spec plus racials
85-
for tab = 1, 2 do
84+
-- cache spells
85+
for tab = 1, GetNumSpellTabs() do
8686
local _, _, offset, numSlots = GetSpellTabInfo(tab)
8787
for slot = 1, numSlots do
8888
local index = offset + slot

0 commit comments

Comments
 (0)