Originally Posted by Phanx
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?