From 4d5e82d989dc88f776a29b98c63e26c8679e5c85 Mon Sep 17 00:00:00 2001 From: Repooc Date: Tue, 18 Mar 2014 00:44:50 -0400 Subject: [PATCH] Had errror because table was nil --- ElvUI_SLE/modules/characterframe/inspectframe.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ElvUI_SLE/modules/characterframe/inspectframe.lua b/ElvUI_SLE/modules/characterframe/inspectframe.lua index 69178d8..e7066d8 100644 --- a/ElvUI_SLE/modules/characterframe/inspectframe.lua +++ b/ElvUI_SLE/modules/characterframe/inspectframe.lua @@ -55,6 +55,27 @@ KI.Default_CurrentInspectData = { ['Glyph'] = { [1] = {}, [2] = {} }, ['Profession'] = { [1] = {}, [2] = {} } } +KI.CurrentGroupMode = 'NoGroup' -- Default +local function CheckGroupMode() + local Check + + if not (IsInGroup() or IsInRaid()) or GetNumGroupMembers() == 1 then + Check = 'NoGroup' + else + if IsInRaid() then + Check = 'raid' + else + Check = 'party' + end + end + + if KI.CurrentGroupMode ~= Check then + KI.CurrentGroupMode = Check + + end +end +KI:RegisterEvent('GROUP_ROSTER_UPDATE', 'CheckGroupMode') +KI:RegisterEvent('PLAYER_ENTERING_WORLD', 'CheckGroupMode') local function Button_OnEnter(self) self:SetBackdropBorderColor(unpack(E.media.rgbvaluecolor)) -- 1.7.9.5