protected override List<World.Paths.PathCoordinate> GetNewPath() { var pathFinder = new World.Paths.PathFinder(this.World); var player = World.GetClosestPlayer(this.Position, 24.0) as Player; Target = player; if (Target != null) { var path = pathFinder.CreatePathToEntity(this, Target, SightRange); if (path != null) Server.Logger.Log(LogLevel.Debug, "Found player within {0}, can reach in {1} blocks", SightRange, path.Count); return path; } return null; }
protected override List <World.Paths.PathCoordinate> GetNewPath() { var pathFinder = new World.Paths.PathFinder(this.World); var player = World.GetClosestPlayer(this.Position, 24.0) as Player; Target = player; if (Target != null) { var path = pathFinder.CreatePathToEntity(this, Target, SightRange); if (path != null) { Server.Logger.Log(LogLevel.Debug, "Found player within {0}, can reach in {1} blocks", SightRange, path.Count); } return(path); } return(null); }