diff --git a/HeroLib/Class/Unit/Range.lua b/HeroLib/Class/Unit/Range.lua index 56342aa3..4b0d34f1 100755 --- a/HeroLib/Class/Unit/Range.lua +++ b/HeroLib/Class/Unit/Range.lua @@ -364,7 +364,7 @@ function Unit:IsInRangeByItem(Distance) -- If the distance we want to check doesn't exists, we look for a fallback. if not ItemRange[Distance] then -- Iterate in reverse order the ranges in order to find the exact rannge or one that is lower than the one we look for (so we are guarantee it is in range) - local RangeIndex = Player:CanAttack(self) and RangeTable.HostileIndex or RangeTable.FriendlyIndex + local RangeIndex = RangeTable.RangeIndex for i = #RangeIndex, 1, -1 do local Range = RangeIndex[i] if Range == Distance then break end