From 033fead2ee05e53dcf75cefbfe1f583ca935aec3 Mon Sep 17 00:00:00 2001 From: Peter Eliasson Date: Mon, 12 Jan 2015 20:06:08 +0100 Subject: [PATCH] PreInspectGroup fixes; * Now ignores the player. * Now checks so that it only inspects players in the guild. --- inspect.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inspect.lua b/inspect.lua index dabe888..a86f9c5 100644 --- a/inspect.lua +++ b/inspect.lua @@ -115,7 +115,7 @@ function inspect:IsPlayerInInspectQueue(player) end function inspect:QueueInspect(player, callback) - self:Debug("QueueNotifyInspect " .. player.name) + self:Debug("QueueInspect " .. player.name) if not self.inspectQueue[player.id] then self.inspectQueue[player.id] = {player = player, callbacks = {}}; @@ -200,11 +200,13 @@ end function inspect:PreInspectGroup() for i=1, GetNumGroupMembers() do - local playerName = GetRaidRosterInfo(i); - if playerName then + + local playerName = GetRaidRosterInfo(i); + if playerName and addon:IsInMyGuild(playerName) then + local playerId = UnitGUID(playerName) - if playerId and not hasPlayerInspectCache(playerId) and CanInspect(playerName) then - local player = {name=playerName, id = playerId} + if playerId and playerId ~= playerGUID and not hasPlayerInspectCache(playerId) then + local player = {name=playerName, id=playerId} self:QueueInspect(player, NOOP); end end -- 1.7.9.5