aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-08-22 21:10:43 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2017-02-18 14:30:32 +0100
commit9b63ee43337a5449d6a74869c8d91dfa8b5211bb (patch)
tree5faec803dc0bd695754d54ffd728b9e4d8cecf25 /src
parent143f0c0e4d8c47be603fee0ed2ac785fce727421 (diff)
Core/Creatures: Exclude despawned creatures from being found by "nearest entry" searchers
Updates #11418 Closes #17706 (cherry picked from commit 75c34bda679e7307c6e85b7e288b6e72eb14ca38)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 3ff1ae222af..ce1e81468ab 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1185,7 +1185,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;