From 4423ca99e7f8c38ff83196134038a7790313ed7a Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 11 Jul 2019 23:31:46 +0200 Subject: Entities/GO: FindNearestGameObject no longer incorrectly returns despawned gameobjects. Closes #23262. --- src/server/game/Grids/Notifiers/GridNotifiers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 29251bbde10..ac9cb43a694 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -740,7 +740,7 @@ namespace Trinity bool operator()(GameObject* go) { - if (go->GetEntry() == i_entry && go->GetGUID() != i_obj.GetGUID() && i_obj.IsWithinDistInMap(go, i_range)) + if (go->isSpawned() && go->GetEntry() == i_entry && go->GetGUID() != i_obj.GetGUID() && i_obj.IsWithinDistInMap(go, i_range)) { i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check return true; -- cgit v1.2.3