Thread: API Changes
View Single Post
09-04-14, 02:49 PM   #20
gizmo28
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1
Originally Posted by p3lim View Post
It seems to be gone, use this:

Code:
GetAddOnEnableState('character', index)
This would also work without to much work:

Code:
		local enabled
		for i = 1, GetNumAddOns() do
			local name, title, notes, loadable, reason, security, newversion = GetAddOnInfo(i)
			if name ==  "NameofAddon" and loadable then
				enabled = true
				break
			end
		end
You can use either one of these of:

name - Name of the addon (name of the addon's folder and TOC file) (string)
title - Title of the addon (from the Title header in the addon's TOC file) (string)

I personally would use name because some people use different titles from the addon folder in their .toc files.

Last edited by gizmo28 : 09-04-14 at 03:41 PM.