Fixed nil value problem in friendlies search

This commit is contained in:
FlightControl_Master 2017-08-30 20:11:31 +02:00
parent 05d9faedee
commit bfd0c19109

View File

@ -1281,9 +1281,10 @@ do -- DETECTION_BASE
--- @param Wrapper.Unit#UNIT PlayerUnit
function( PlayerUnitName )
local PlayerUnit = UNIT:FindByName( PlayerUnitName )
local PlayerUnitCategory = PlayerUnit:GetDesc().category
if PlayerUnit and PlayerUnit:IsInZone(DetectionZone) then
local PlayerUnitCategory = PlayerUnit:GetDesc().category
if ( not self.FriendliesCategory ) or ( self.FriendliesCategory and ( self.FriendliesCategory == PlayerUnitCategory ) ) then