Core/Gameobjects: Improve stealth detection

This commit is contained in:
Gildor authored and Ovahlord committed 2022-09-12 09:15:27 +02:00
1 parent eeef100e08
commit eab8e4aefb
4 files changed
+20 -13

No files matched your search

@@ -990,7 +990,7 @@ void GameObject::Update(uint32 diff)
if (Unit* owner = GetOwner())
{
// Hunter trap: Search units which are unfriendly to the trap's owner
Trinity::NearestAttackableNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
Trinity::NearestAttackableNoTotemUnitInObjectRangeCheck checker(this, radius);
Trinity::UnitLastSearcher<Trinity::NearestAttackableNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
Cell::VisitAllObjects(this, searcher, radius);
}