Core/Gameobjects: Improve stealth detection

Port From (https://github.com/TrinityCore/TrinityCore/commit/60e66621dae44cb832ebb0bdb5e168f9ab114ecb)
This commit is contained in:
hondacrx
2022-02-18 12:51:16 -05:00
parent 743d0158d6
commit a604bbd7f9
4 changed files with 22 additions and 15 deletions
@@ -663,7 +663,7 @@ namespace Game.Entities
if (owner)
{
// Hunter trap: Search units which are unfriendly to the trap's owner
var checker = new NearestAttackableNoTotemUnitInObjectRangeCheck(this, owner, radius);
var checker = new NearestAttackableNoTotemUnitInObjectRangeCheck(this, radius);
var searcher = new UnitLastSearcher(this, checker);
Cell.VisitAllObjects(this, searcher, radius);
target = searcher.GetTarget();