示例#1
0
 public ListAvatarCustomizationsResponse ListAvatarCustomizations(PlayerAvatarType _avatarType, RepeatedField <Filter> _filters, RepeatedField <Slot> _slot, int _limit, int _start)
 {
     return(PostProtoPayloadCommonR <Request, ListAvatarCustomizationsResponse>(RequestType.ListAvatarCustomizations, new ListAvatarCustomizationsMessage()
     {
         AvatarType = _avatarType,
         //Filters = _filters,
         //Slot = _slot,
         Start = _start,
         Limit = _limit
     }).Result);
 }
示例#2
0
        /// <summary>
        /// Gets the image for gender.
        /// </summary>
        /// <param name="gender">The gender.</param>
        /// <returns></returns>
        private Image getImageForGender(PlayerAvatarType gender)
        {
            switch (gender)
            {
            case PlayerAvatarType.PlayerAvatarMale:
                return(Properties.Resources.Trainer_M);

            case PlayerAvatarType.PlayerAvatarFemale:
                return(Properties.Resources.Trainer_F);

            default:
                return(Properties.Resources.Trainer_M);
            }
        }
示例#3
0
        //https://github.com/AeonLucid/POGOProtos/blob/master/src/POGOProtos/Networking/Requests/RequestType.proto#L83
        public async Task <ListAvatarCustomizationsResponse> ListAvatarCustomizations(PlayerAvatarType avatarType, int limit, int start)
        {
            var setPlayerTeamRequest = new Request
            {
                RequestType    = RequestType.ListAvatarCustomizations,
                RequestMessage = new ListAvatarCustomizationsMessage
                {
                    AvatarType = avatarType,
                    //Filters = xxx,
                    Limit = limit,
                    //Slot = xxx,
                    Start = start
                }.ToByteString()
            };

            var request = await GetRequestBuilder().GetRequestEnvelope(CommonRequest.FillRequest(setPlayerTeamRequest, Client)).ConfigureAwait(false);

            Tuple <ListAvatarCustomizationsResponse, CheckChallengeResponse, GetHatchedEggsResponse, GetInventoryResponse, CheckAwardedBadgesResponse, DownloadSettingsResponse, GetBuddyWalkedResponse> response =
                await
                PostProtoPayload
                <Request, ListAvatarCustomizationsResponse, CheckChallengeResponse, GetHatchedEggsResponse, GetInventoryResponse,
                 CheckAwardedBadgesResponse, DownloadSettingsResponse, GetBuddyWalkedResponse>(request).ConfigureAwait(false);

            CheckChallengeResponse checkChallengeResponse = response.Item2;

            CommonRequest.ProcessCheckChallengeResponse(Client, checkChallengeResponse);

            GetInventoryResponse getInventoryResponse = response.Item4;

            CommonRequest.ProcessGetInventoryResponse(Client, getInventoryResponse);

            DownloadSettingsResponse downloadSettingsResponse = response.Item6;

            CommonRequest.ProcessDownloadSettingsResponse(Client, downloadSettingsResponse);

            return(response.Item1);
        }