View Single Post
02-18-13, 10:09 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You should put the class check in all of your files, but modify one (usually in your main file, or the one that loads first) to disable the addon for characters who don't pass the class check, so you're not wasting time reading all the addon's files and class checking every time you log into that character:

Code:
local _, class == UnitClass("player")
if class == "WARLOCK" or class == "MONK" then
     return DisableAddOn("ThisAddOn")
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote