Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-17-17, 06:35 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Class specific addon?

Hi all,

Just a quick question here.
Would it be possible to create a class specific addon?
I mean of course you can set addons to load from addon control panel for each character, but I want to create something that only loads for specific class.

Currently, I've stated the following lines of code at the top of each Lua files for one of my addon.

Lua Code:
  1. if select(2, UnitClass("player")) ~= "ROGUE" then
  2.     return;
  3. end

Those lines are written on every localization, core, etc and it honestly doesn't mean that the addon "WON'T BE LOADED". The addon would still be loaded, but only skips rest of the code if the class doesn't match.

Would there be any possible solution to this?

Thank you!

Last edited by Layback_ : 12-17-17 at 06:38 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Class specific addon?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off