示例#1
0
        public async Task <FortSearchResponse> SearchFort(string fortId, double fortLat, double fortLng)
        {
            var message = new FortSearchMessage
            {
                FortId          = fortId,
                FortLatitude    = fortLat,
                FortLongitude   = fortLng,
                PlayerLatitude  = Client.CurrentLatitude,
                PlayerLongitude = Client.CurrentLongitude
            };

            return(await PostProtoPayload <Request, FortSearchResponse>(RequestType.FortSearch, message));
        }
示例#2
0
        public async Task <FortSearchResponse> SearchFort(string fortId, double fortLat, double fortLng)
        {
            FortSearchMessage fortSearchMessage = new FortSearchMessage()
            {
                FortId          = fortId,
                FortLatitude    = fortLat,
                FortLongitude   = fortLng,
                PlayerLatitude  = CurrentLat,
                PlayerLongitude = CurrentLng
            };

            return(await AwaitableOnResponseFor <FortSearchMessage, FortSearchResponse>(fortSearchMessage, RequestType.FortSearch));
        }
示例#3
0
        public async Task<FortSearchResponse> SearchFort(string fortId, double fortLat, double fortLng)
        {
            var message = new FortSearchMessage
            {
                FortId = fortId,
                FortLatitude = fortLat,
                FortLongitude = fortLng,
                PlayerLatitude = _client.CurrentLatitude,
                PlayerLongitude = _client.CurrentLongitude
            };

            return await _baseRpc.PostProtoPayload<Request, FortSearchResponse>(RequestType.FortSearch, message);
        }
示例#4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="fortId"></param>
        /// <param name="fortLat"></param>
        /// <param name="fortLng"></param>
        /// <returns></returns>
        public bool QueueSearchFortRequest(string fortId, double fortLat, double fortLng)
        {
            var message = new FortSearchMessage
            {
                FortId          = fortId,
                FortLatitude    = fortLat,
                FortLongitude   = fortLng,
                PlayerLatitude  = Client.CurrentPosition.Latitude,
                PlayerLongitude = Client.CurrentPosition.Longitude
            };

            return(Client.QueueRequest(RequestType.FortSearch, message));
        }