Core/Objects: Unify Searcher classes into one common implementation
Port From (https://github.com/TrinityCore/TrinityCore/commit/261eb201bf107cef441d9b075e8f23bf0edfbaf0) Port From (https://github.com/TrinityCore/TrinityCore/commit/526b16fea41fb69a302fdebe8a727e175949f04b) Port From (https://github.com/TrinityCore/TrinityCore/commit/8b7dce6521323e788ebf28297ec941a6f9bf876f) Port From (https://github.com/TrinityCore/TrinityCore/commit/5334467f493eb16141f4ad0bce956bc3e19244a0) Port From (https://github.com/TrinityCore/TrinityCore/commit/1e7725c15b149baaf96731231239769e482ec2ed) Port From (https://github.com/TrinityCore/TrinityCore/commit/21712f475383f6f3fae107706f5de5195f75b760)
This commit is contained in:
@@ -400,7 +400,7 @@ namespace Game.Chat
|
||||
NearestGameObjectCheck check = new(pl);
|
||||
GameObjectLastSearcher searcher = new(pl, check);
|
||||
Cell.VisitGridObjects(pl, searcher, MapConst.SizeofGrids);
|
||||
return searcher.GetTarget();
|
||||
return searcher.GetResult();
|
||||
}
|
||||
|
||||
public string PlayerLink(string name)
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Game.Chat
|
||||
var check = new AllCreaturesOfEntryInRange(handler.GetPlayer(), entry, 20.0f);
|
||||
var searcher = new CreatureSearcher(handler.GetPlayer(), check);
|
||||
Cell.VisitAllObjects(handler.GetPlayer(), searcher, 30.0f);
|
||||
var passenger = searcher.GetTarget();
|
||||
var passenger = searcher.GetResult();
|
||||
if (passenger == null || passenger == target)
|
||||
return false;
|
||||
passenger.EnterVehicle(target, seatId);
|
||||
|
||||
@@ -1571,7 +1571,8 @@ namespace Game.Chat
|
||||
}
|
||||
|
||||
// First handle any creatures that still have a corpse around
|
||||
var worker = new WorldObjectWorker(player, new RespawnDo());
|
||||
RespawnDo u_do = new();
|
||||
WorldObjectWorker<Creature> worker = new(player, u_do);
|
||||
Cell.VisitGridObjects(player, worker, player.GetGridActivationRange());
|
||||
|
||||
// Now handle any that had despawned, but had respawn time logged.
|
||||
|
||||
Reference in New Issue
Block a user