fix create talent cache in first entering the world
This commit is contained in:
parent
de72394bda
commit
8938ffee16
1 changed files with 4 additions and 0 deletions
|
|
@ -1657,6 +1657,7 @@ loadedFrame:RegisterEvent("ADDON_LOADED");
|
|||
loadedFrame:RegisterEvent("PLAYER_LOGIN");
|
||||
loadedFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
loadedFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
|
||||
loadedFrame:RegisterEvent("SPELL_UPDATE_USABLE");
|
||||
loadedFrame:SetScript("OnEvent", function(self, event, addon)
|
||||
if(event == "ADDON_LOADED") then
|
||||
if(addon == ADDON_NAME) then
|
||||
|
|
@ -1725,6 +1726,9 @@ loadedFrame:SetScript("OnEvent", function(self, event, addon)
|
|||
WeakAuras.CreateTalentCache() -- It seems that GetTalentInfo might give info about whatever class was previously being played, until PLAYER_ENTERING_WORLD
|
||||
WeakAuras.UpdateCurrentInstanceType();
|
||||
end
|
||||
elseif(event == "SPELL_UPDATE_USABLE") then
|
||||
callback = WeakAuras.CreateTalentCache;
|
||||
WeakAuras.frames["Addon Initialization Handler"]:UnregisterEvent("SPELL_UPDATE_USABLE")
|
||||
elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then
|
||||
callback = WeakAuras.CreateTalentCache;
|
||||
elseif(event == "PLAYER_REGEN_ENABLED") then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue