From f25fe4496bb8c50abc2af984d7257a79faea9000 Mon Sep 17 00:00:00 2001 From: coolmodi <7333074+coolmodi@users.noreply.github.com> Date: Mon, 27 Apr 2020 13:46:07 +0200 Subject: [PATCH] disable events on unsupported classes --- events.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/events.lua b/events.lua index 080a25a..b89041f 100644 --- a/events.lua +++ b/events.lua @@ -1,5 +1,12 @@ local _addonName, _addon = ...; -local L = _addon:GetLocalization(); + +-- dirty fix to "disable" the addon preventing errors on unsupported classes +-- TODO: Remove when classes are supported +local _, class = UnitClass("player"); +if class == "WARRIOR" or class == "ROGUE" or class == "HUNTER" then + _addon:PrintError("Class not (yet) supported, addon won't work!"); + return; +end local frame = CreateFrame("Frame"); local handlers = {};