mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 04:59:41 -04:00
Core/GameObjects: Fixed Frozen Trap target selection
Closes #14238 Closes #17517
This commit is contained in:
@@ -511,11 +511,9 @@ void GameObject::Update(uint32 diff)
|
||||
if (Unit* owner = GetOwner())
|
||||
{
|
||||
// Hunter trap: Search units which are unfriendly to the trap's owner
|
||||
Trinity::AnyUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
|
||||
Trinity::UnitSearcher<Trinity::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
|
||||
VisitNearbyGridObject(radius, searcher);
|
||||
if (!target)
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
Trinity::NearestUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
|
||||
Trinity::UnitLastSearcher<Trinity::NearestUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
|
||||
VisitNearbyObject(radius, searcher);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user