From 86a390b8b688b3995745c2b3ecc6b0e3fea967eb Mon Sep 17 00:00:00 2001 From: F16Gaming Date: Sat, 7 Jul 2012 18:13:34 +0200 Subject: [PATCH] Some optimization. --- Events.lua | 3 +-- GroupTools.lua | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Events.lua b/Events.lua index 684aa56..11af75a 100644 --- a/Events.lua +++ b/Events.lua @@ -101,8 +101,7 @@ function C.Events.PARTY_INVITE_REQUEST(self, ...) local locale = C.PlayerManager:GetOrCreatePlayer(sender).Settings.Locale local msg = C.LocaleManager:GetLocale(locale, true)["E_GROUPINVITE"] if self.Settings.GROUP_INVITE_ANNOUNCE_DELAY > 0 then - local f=CreateFrame("Frame")f.T=0;f.L=self.Settings.GROUP_INVITE_ANNOUNCE_DELAY;f.S=sender;f.M=msg - f:SetScript("OnUpdate",function(s,e)s.T=s.T+e;if(s.T>s.L)then s:SetScript("OnUpdate",nil)if(StaticPopup_Visible("PARTY_INVITE"))then CM:SendMessage(s.M,"WHISPER",s.S)end;end;end) + local f=CreateFrame("Frame")f.T=0;f.L=self.Settings.GROUP_INVITE_ANNOUNCE_DELAY;f.S=sender;f.M=msg;f:SetScript("OnUpdate",function(s,e)s.T=s.T+e;if(s.T>s.L)then s:SetScript("OnUpdate",nil)if(StaticPopup_Visible("PARTY_INVITE"))then CM:SendMessage(s.M,"WHISPER",s.S)end;end;end) else CM:SendMessage(msg, "WHISPER", sender) end diff --git a/GroupTools.lua b/GroupTools.lua index d8db909..1dd3104 100644 --- a/GroupTools.lua +++ b/GroupTools.lua @@ -83,6 +83,7 @@ end -- @return True if the player is in an LFG group, false otherwise. -- function GT:IsLFGGroup() + if IsPartyLFG() then return true end for k,_ in pairs(LFG_CATEGORY_NAMES) do if type(k) ~= "number" then -- Safety check, you never know with blizzard k = tonumber(k) or LE_LFG_CATEGORY_LFD -- 1.7.9.5