mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
libspell: reset caches on skill change
This commit is contained in:
@@ -135,5 +135,12 @@ function libspell.GetSpellInfo(index, bookType)
|
||||
return name, rank, icon, castingTime, minRange, maxRange
|
||||
end
|
||||
|
||||
-- Reset all spell caches whenever new spells are learned/unlearned
|
||||
local resetcache = CreateFrame("Frame")
|
||||
resetcache:RegisterEvent("LEARNED_SPELL_IN_TAB")
|
||||
resetcache:SetScript("OnEvent", function()
|
||||
spellmaxrank, spellindex, spellinfo = {}, {}, {}
|
||||
end)
|
||||
|
||||
-- add libspell to pfUI API
|
||||
pfUI.api.libspell = libspell
|
||||
|
||||
Reference in New Issue
Block a user