aboutsummaryrefslogtreecommitdiff
path: root/src/game/OutdoorPvPObjectiveAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/OutdoorPvPObjectiveAI.cpp')
-rw-r--r--src/game/OutdoorPvPObjectiveAI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/OutdoorPvPObjectiveAI.cpp b/src/game/OutdoorPvPObjectiveAI.cpp
index 62c4cb96191..9c9603a7f91 100644
--- a/src/game/OutdoorPvPObjectiveAI.cpp
+++ b/src/game/OutdoorPvPObjectiveAI.cpp
@@ -34,7 +34,8 @@ void OutdoorPvPObjectiveAI::MoveInLineOfSight(Unit *u)
{
// IsVisible only passes for players in range, so no need to check again
// leaving/entering distance will be checked based on go range data
- sOutdoorPvPMgr.HandleCaptureCreaturePlayerMoveInLos(((Player*)u),&i_creature);
+ if((u->GetTypeId() == TYPEID_PLAYER) && i_creature.IsWithinDistInMap(u, MAX_OUTDOOR_PVP_DISTANCE))
+ sOutdoorPvPMgr.HandleCaptureCreaturePlayerMoveInLos(((Player*)u),&i_creature);
}
int OutdoorPvPObjectiveAI::Permissible(const Creature * c)