From b1f20ced7abb59c162520d98b7d1736b609129c5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 22 Aug 2016 21:10:43 +0200 Subject: [PATCH] Core/Creatures: Exclude despawned creatures from being found by "nearest entry" searchers Updates #11418 Closes #17706 --- src/server/game/Grids/Notifiers/GridNotifiers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index b8fd6dc1b7..114d41c2e4 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1169,7 +1169,7 @@ namespace Trinity bool operator()(Creature* u) { - if (u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range)) + if (u->getDeathState() != DEAD && u->GetEntry() == i_entry && u->IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range)) { i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check return true;