View Single Post
12-28-17, 01:08 PM   #15
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Just having come to my seneses, unless you are looking up the information in-game during a session, you can run the process just once at PLAYER_LOGOUT.

Lua Code:
  1. local function PLAYER_LOGOUT()
  2.             AddonListDB = {}
  3.             local addcount = GetNumAddOns()
  4.             for i = 1,addcount do
  5.                 local name, title, notes, loadable, reason, security, newVersion = GetAddOnInfo(i)
  6.                 loaded, finished = IsAddOnLoaded(i)
  7.                     AddonListDB[i] = {
  8.                     Title=title,
  9.                     Loaded=loaded or false
  10.                 };
  11.             end
  12.     end
  13.  
  14.     local JWFrame = CreateFrame("Frame");
  15.     JWFrame:RegisterEvent("PLAYER_LOGOUT");
  16.     JWFrame:SetScript("OnEvent", PLAYER_LOGOUT)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-28-17 at 01:20 PM.
  Reply With Quote