Quantcast

Some optimization.

F16Gaming [07-07-12 - 16:13]
Some optimization.
Filename
Events.lua
GroupTools.lua
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