From bea3e16915765ec0d2cf89cfc8de750244a45487 Mon Sep 17 00:00:00 2001 From: GryllsAddons <107083057+GryllsAddons@users.noreply.github.com> Date: Mon, 6 Mar 2023 21:16:07 +0000 Subject: [PATCH] Add files via upload --- unitscan.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unitscan.lua b/unitscan.lua index 76e9d09..6cc5896 100644 --- a/unitscan.lua +++ b/unitscan.lua @@ -74,10 +74,10 @@ do local target = UnitName'target' -- return target and strupper(target) == name if target then - -- always return players, only return alive mobs + -- always return players, only return neutral or hostile mobs that are alive if UnitIsPlayer'target' then return strupper(target) - elseif not UnitIsDead'target' then + elseif (UnitReaction("target", "player") <= 4) and (not UnitIsDead'target') then return strupper(target) end else