Thread: Get addons list
View Single Post
02-10-16, 11:11 AM   #5
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Originally Posted by Resike View Post
Originally Posted by Phanx View Post
Those return values are incorrect. GetAddOnInfo's return values changed with the release of WoD, and the enabled return was moved to a different function:

Code:
local CHARACTER = UnitName("player")
for i = 1, GetNumAddOns() do
    local name, title, notes, loadable, reason, security, newVersion = GetAddOnInfo(i)
    local enabled = GetAddOnEnableState(CHARACTER, id)
    -- do stuff here
end
You can alternatively pass nil instead of a character name to GetAddOnEnableState to query whether the addon is enabled/disabled for all characters, instead of just for the specified one.

EnableAddOn(i) and DisableAddOn(i) can be called with true as a second argument to enable/disable the addon for all characters, instead of just for the current one.
I guess id should be i here?
That is correct.
__________________
Profile: Curse | Wowhead
  Reply With Quote