mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-24 13:00:50 +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
|
return name, rank, icon, castingTime, minRange, maxRange
|
||||||
end
|
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
|
-- add libspell to pfUI API
|
||||||
pfUI.api.libspell = libspell
|
pfUI.api.libspell = libspell
|
||||||
|
|||||||
Reference in New Issue
Block a user