コード例 #1
0
ファイル: Player.cs プロジェクト: linyuhan/PokemonGo-Bot-1
 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);
        }