From 23b4f3496c9d57dbdeced07eae712a7492ddff1f Mon Sep 17 00:00:00 2001 From: Peter Eliasson Date: Thu, 15 Jan 2015 15:17:41 +0100 Subject: [PATCH] Fixed bug where pre-inspect was run when in pvp-arena. --- inspect.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inspect.lua b/inspect.lua index bf5b21a..dce5075 100644 --- a/inspect.lua +++ b/inspect.lua @@ -22,6 +22,13 @@ local NOOP = function() end local playerGUID = UnitGUID("player"); local inspectCache = {}; + + +local function isInPVEInstance() + local isInstance, instanceType = IsInInstance(); + return inInstance and (instanceType == "party" or instanceType == "raid") +end + local function getTalentSpec(unitName) if unitName == "player" then local spec = GetSpecialization(); @@ -239,7 +246,7 @@ function inspect:GROUP_ROSTER_UPDATE(evt) end function inspect:ZONE_CHANGED_NEW_AREA(evt) - if IsInInstance() and IsInRaid() then + if isInPVEInstance() then -- We just zoned into an instance, try pre-inspecting the group self:PreInspectGroup(); end -- 1.7.9.5