Originally Posted by Seerah
Just to be clear...
Lua Code:
local _, class = UnitClass("player") if class ~= "ROGUE" then DisableAddon("YourAddonName") --you don't need to specify a character here, unless you want to disable for a different character than the one you're on ;) return end
|
So, am I doing the right thing?
.TOC
Code:
## Title: Title
## Notes: Note
## Extra Tags: Extra Tag Values
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibSharedMedia-3.0
Loader.lua
lib\load.xml
media\load.xml
locale\load.xml
Core.lua
Loader.lua
Lua Code:
if select(2, UnitClass("player")) ~= "ROGUE" then
DisableAddon("YourAddonName");
return;
end
Core.lua
Lua Code:
-- Passed class test :)
code
code
code
I Like the idea, but as Ammako stated, wouldn't this require
ReloadUI() to take effect?
I'm currently away from my main PC and can't test this