enable/disable addon based on class.
I am trying to make a addon that enables/disables other addons based on the character class.
exp. If class = hunter & addon = XXXX is not on, enable it or if class is not = hunter & addon "hunter addon" is enabled, disable addon. coding exp (currently not working) Code:
local playerClass, englishClass = UnitClass("player"); |
You can select addons to be loaded in the addon settings for each char.
Guess thats faster than writing an addon. Or you can ask the addonauthors to add support for http://www.wowwiki.com/AddonLoader which can load addons classbased and does not need an uireload. |
Quote:
I know I am able to do it via wow settings. But just trying to do it via addon so I don't have to worry about it upon switching computers, which I seem to do a lot. |
http://www.wowwiki.com/API_ReloadUI
The function ReloadUI is protected. Which means you cant call it without the user clicking key or mouse. So you would need to create a button to prompt for the reload when needed. |
Not to mention most addons that are class specific have their own class loaders in them. I know mine do....
|
What i do with Nutty War Announce is have the addon disable for next login if the class that logs in with it is not a warrior. You should be able to edit the below code to suit yourself easy enough.
Code:
function NuttyWarAnnounce:OnInitialize() Edit: Sorry read the thread wrong. Hope this can be of some use tho. |
what i do with my warlock addon is
Code:
local function nDemonic_Disable() |
All times are GMT -6. The time now is 07:49 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI